-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
blocked by #2424
same process as #2415 -- useful activerecord statements copied from that issue
# get a list of batch_size random druids that are not yet replicated to GCP:
batch_size = 100 # you probably want to 10x or 100x this eventually (and do it in a screen session if so)
druids = PreservedObject.where.not(id: PreservedObject.joins(zipped_moab_versions: [:zip_endpoint]).where(zip_endpoint: { endpoint_name: 'gcp_s3_south_1' })).limit(batch_size).pluck(:druid)
# sanity check: list the endpoints that have your druids
PreservedObject.joins(zipped_moab_versions: [:zip_endpoint]).where(druid: druids).group(:druid).pluck('druid', 'ARRAY_AGG(zip_endpoints.endpoint_name)')
# ship em 🚢
PreservedObject.where(druid: druids).find_each(&:create_zipped_moab_versions!)
resources for query tweaking:
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Ready (Ordered by Priority)
Status
Backlog (Blocked, Epics, &c.)