about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-04-03 18:55:06 +0200
committerEugen Rochko <eugen@zeonfederated.com>2017-04-03 18:55:06 +0200
commitb7c1b12367b307d07303ce99f2c27bf255ecd56a (patch)
treec25b886e2dc3585305abc3df9a3ff1b43d7bbd02 /app/workers
parentf6e9251054d21cb463a8fee44922d908aa7e2c03 (diff)
Make default admin UI page reports. Add admin UI for creating a domain block
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/domain_block_worker.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/workers/domain_block_worker.rb b/app/workers/domain_block_worker.rb
new file mode 100644
index 000000000..884477829
--- /dev/null
+++ b/app/workers/domain_block_worker.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class DomainBlockWorker
+  include Sidekiq::Worker
+
+  def perform(domain_block_id)
+    BlockDomainService.new.call(DomainBlock.find(domain_block_id))
+  rescue ActiveRecord::RecordNotFound
+    true
+  end
+end