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

lolsob-rspec
Eugen Rochko 2019-01-20 12:57:05 +01:00 committed by GitHub
parent f77529ca00
commit 58f77b7de2
1 changed files with 2 additions and 0 deletions

View 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!