diff options
Diffstat (limited to 'app/workers/scheduler/backup_cleanup_scheduler.rb')
-rw-r--r-- | app/workers/scheduler/backup_cleanup_scheduler.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/workers/scheduler/backup_cleanup_scheduler.rb b/app/workers/scheduler/backup_cleanup_scheduler.rb index 5ab16c057..023a77307 100644 --- a/app/workers/scheduler/backup_cleanup_scheduler.rb +++ b/app/workers/scheduler/backup_cleanup_scheduler.rb @@ -3,8 +3,10 @@ class Scheduler::BackupCleanupScheduler include Sidekiq::Worker + sidekiq_options unique: :until_executed + def perform - old_backups.find_each(&:destroy!) + old_backups.reorder(nil).find_each(&:destroy!) end private |