]> cat aescling's git repositories - mastodon.git/commitdiff
Fix multiple workers for the same scheduled status being queueable (#9875)
authorEugen Rochko <eugen@zeonfederated.com>
Sun, 20 Jan 2019 11:57:05 +0000 (12:57 +0100)
committerGitHub <noreply@github.com>
Sun, 20 Jan 2019 11:57:05 +0000 (12:57 +0100)
app/workers/publish_scheduled_status_worker.rb

index 641fcc61c72d8b4d4beb5e62a0c4ab22d3b67be4..850610c4e3cdb932dc16dd150a9a58d22039d44f 100644 (file)
@@ -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!