From 4c1705e58dbdc47a90b9bc6d989d1a90ebd8287c Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 17 Feb 2020 19:34:35 -0600 Subject: remove unique job constaint, handle `Mastodon::NotPermittedError` --- app/workers/reblog_status_worker.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/workers/reblog_status_worker.rb b/app/workers/reblog_status_worker.rb index 250041a7d..1f388bb3a 100644 --- a/app/workers/reblog_status_worker.rb +++ b/app/workers/reblog_status_worker.rb @@ -3,15 +3,13 @@ class ReblogStatusWorker include Sidekiq::Worker - sidekiq_options unique: :until_executed - def perform(account_id, status_id, reblog_params = {}) account = Account.find(account_id) status = Status.find(status_id) return false if status.destroyed? || !status.distributable? ReblogService.new.call(account, status, reblog_params.symbolize_keys) true - rescue ActiveRecord::RecordNotFound, ActiveRecord::RecordInvalid + rescue ActiveRecord::RecordNotFound, ActiveRecord::RecordInvalid, Mastodon::NotPermittedError true end end -- cgit