FIX: ensure we don't queue any jobs during s3 migration

Previously we could flood sidekiq with jobs which is not ideal.

This ensures we are 100% done when the job is done.
This commit is contained in:
Sam Saffron 2019-05-20 16:28:50 +10:00
parent a4627c3d82
commit 08371db0cc

View File

@ -213,6 +213,10 @@ def migrate_to_s3_all_sites
end
def migrate_to_s3
# we don't want have migrated state, ensure we run all jobs here
Jobs.run_immediately!
db = RailsMultisite::ConnectionManagement.current_db
dry_run = !!ENV["DRY_RUN"]