From 08371db0cc2581bf054734b6f31fe752e8d5c945 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Mon, 20 May 2019 16:28:50 +1000 Subject: [PATCH] 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. --- lib/tasks/uploads.rake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/tasks/uploads.rake b/lib/tasks/uploads.rake index 1012d13c629..cc0846b59d4 100644 --- a/lib/tasks/uploads.rake +++ b/lib/tasks/uploads.rake @@ -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"]