From 91c929a42cbb71b47af976ec021f4be235b9f3fe Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 19 Aug 2018 15:48:29 +0200 Subject: Keep scheduler jobs unique until they're done (#8287) --- app/workers/scheduler/media_cleanup_scheduler.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/workers/scheduler/media_cleanup_scheduler.rb') diff --git a/app/workers/scheduler/media_cleanup_scheduler.rb b/app/workers/scheduler/media_cleanup_scheduler.rb index c35686fcb..a27e02953 100644 --- a/app/workers/scheduler/media_cleanup_scheduler.rb +++ b/app/workers/scheduler/media_cleanup_scheduler.rb @@ -3,6 +3,8 @@ class Scheduler::MediaCleanupScheduler include Sidekiq::Worker + sidekiq_options unique: :until_executed + def perform unattached_media.find_each(&:destroy) end -- cgit