about summary refs log tree commit diff
path: root/app/workers/scheduler/email_scheduler.rb
diff options
context:
space:
mode:
authorpluralcafe-docker <docker@plural.cafe>2018-08-22 08:26:56 +0000
committerpluralcafe-docker <docker@plural.cafe>2018-08-22 08:26:56 +0000
commita4935a8e24dcfa865fb330693d8ec90beca1aa98 (patch)
tree9fc0be073bc2ed5bf4231d850106f214fdeb020e /app/workers/scheduler/email_scheduler.rb
parentc339d49d82b3fd2873831029d9c92b3fbf1236e3 (diff)
parent37965ac8d9773ae79f6b8dd6fcd353894d2194ca (diff)
Merge branch 'glitch'
Diffstat (limited to 'app/workers/scheduler/email_scheduler.rb')
-rw-r--r--app/workers/scheduler/email_scheduler.rb4
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