FIX: Unpause Sidekiq before uploading backup to S3

FIX: Unpause Sidekiq before uploading backup to S3

No need to pause Sidekiq longer than really needed. Uploads to S3 can take a long time.

diff --git a/lib/backup_restore/backuper.rb b/lib/backup_restore/backuper.rb
index bbdf0c5..cdda8a1 100644
--- a/lib/backup_restore/backuper.rb
+++ b/lib/backup_restore/backuper.rb
@@ -43,6 +43,8 @@ module BackupRestore
       log "Finalizing backup..."
 
       @with_uploads ? create_archive : move_dump_backup
+
+      unpause_sidekiq
       upload_archive
 
       after_create_hook
@@ -334,6 +336,7 @@ module BackupRestore
     end
 
     def unpause_sidekiq
+      return unless Sidekiq.paused?
       log "Unpausing sidekiq..."
       Sidekiq.unpause!
     rescue => ex

GitHub sha: bdbf77dc

1 Like