From: Eugen Rochko Date: Sun, 20 Jan 2019 11:57:05 +0000 (+0100) Subject: Fix multiple workers for the same scheduled status being queueable (#9875) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=31e7940de553007ea2e863cb9a418ad46837431e;p=mastodon.git Fix multiple workers for the same scheduled status being queueable (#9875) --- 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!