about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-01-20 12:57:05 +0100
committerGitHub <noreply@github.com>2019-01-20 12:57:05 +0100
commit31e7940de553007ea2e863cb9a418ad46837431e (patch)
treea1a127c6f9294e10a378f213296b2c06ac30d93f /app
parent6b91da97bb76aea16659af7ef4a569d70e257f5a (diff)
Fix multiple workers for the same scheduled status being queueable (#9875)
Diffstat (limited to 'app')
-rw-r--r--app/workers/publish_scheduled_status_worker.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/workers/publish_scheduled_status_worker.rb b/app/workers/publish_scheduled_status_worker.rb
index 641fcc61c..850610c4e 100644
--- a/app/workers/publish_scheduled_status_worker.rb
+++ b/app/workers/publish_scheduled_status_worker.rb
@@ -3,6 +3,8 @@
 class PublishScheduledStatusWorker
   include Sidekiq::Worker
 
+  sidekiq_options unique: :until_executed
+
   def perform(scheduled_status_id)
     scheduled_status = ScheduledStatus.find(scheduled_status_id)
     scheduled_status.destroy!