about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-15 12:56:00 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-15 14:12:16 -0500
commit29643fd6c42bcee5a1d6a4a137256b33996c60f2 (patch)
treed1a101068e038d6e0da6d37708f8b1c82c3120df /app/workers
parent992bd7c752ff3fc37ff35713420e74dc7ea7b576 (diff)
make blocking domains actually block the accounts
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/after_account_domain_unblock_worker.rb11
-rw-r--r--app/workers/update_account_domain_blocks_worker.rb11
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