diff options
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/after_account_domain_unblock_worker.rb | 11 | ||||
-rw-r--r-- | app/workers/update_account_domain_blocks_worker.rb | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/app/workers/after_account_domain_unblock_worker.rb b/app/workers/after_account_domain_unblock_worker.rb new file mode 100644 index 000000000..6268f0819 --- /dev/null +++ b/app/workers/after_account_domain_unblock_worker.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class AfterAccountDomainUnblockWorker + include Sidekiq::Worker + + def perform(account_id, domain) + AfterUnblockDomainFromAccountService.new.call(Account.find(account_id), domain) + rescue ActiveRecord::RecordNotFound + true + end +end diff --git a/app/workers/update_account_domain_blocks_worker.rb b/app/workers/update_account_domain_blocks_worker.rb new file mode 100644 index 000000000..14d4e8516 --- /dev/null +++ b/app/workers/update_account_domain_blocks_worker.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class UpdateAccountDomainBlocksWorker + include Sidekiq::Worker + + def perform(account_id) + UpdateAccountDomainBlocksService.new.call(Account.find(account_id)) + rescue ActiveRecord::RecordNotFound + true + end +end |