Browse Source

Fix multiple workers for the same scheduled status being queueable (#9875)

Eugen Rochko 8 months ago
parent
commit
31e7940de5
No account linked to committer's email
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      app/workers/publish_scheduled_status_worker.rb

+ 2
- 0
app/workers/publish_scheduled_status_worker.rb View File

@@ -3,6 +3,8 @@
3 3
 class PublishScheduledStatusWorker
4 4
   include Sidekiq::Worker
5 5
 
6
+  sidekiq_options unique: :until_executed
7
+
6 8
   def perform(scheduled_status_id)
7 9
     scheduled_status = ScheduledStatus.find(scheduled_status_id)
8 10
     scheduled_status.destroy!