diff options
Diffstat (limited to 'app/workers/scheduler/email_scheduler.rb')
-rw-r--r-- | app/workers/scheduler/email_scheduler.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/workers/scheduler/email_scheduler.rb b/app/workers/scheduler/email_scheduler.rb index 36866061b..24117e424 100644 --- a/app/workers/scheduler/email_scheduler.rb +++ b/app/workers/scheduler/email_scheduler.rb @@ -3,8 +3,10 @@ class Scheduler::EmailScheduler include Sidekiq::Worker + sidekiq_options unique: :until_executed + def perform - eligible_users.find_each do |user| + eligible_users.reorder(nil).find_each do |user| next unless user.allows_digest_emails? DigestMailerWorker.perform_async(user.id) end |