about summary refs log tree commit diff
path: root/app/workers/domain_clear_media_worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/domain_clear_media_worker.rb')
-rw-r--r--app/workers/domain_clear_media_worker.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/workers/domain_clear_media_worker.rb b/app/workers/domain_clear_media_worker.rb
new file mode 100644
index 000000000..971934a08
--- /dev/null
+++ b/app/workers/domain_clear_media_worker.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class DomainClearMediaWorker
+  include Sidekiq::Worker
+
+  sidekiq_options queue: 'pull'
+
+  def perform(domain_block_id)
+    domain_block = DomainBlock.find_by(id: domain_block_id)
+    return true if domain_block.nil?
+
+    ClearDomainMediaService.new.call(domain_block)
+  end
+end