async black box

This commit is contained in:
Kyle Drake 2020-11-24 01:11:38 -06:00
parent e4c580564b
commit a2a46d406e
2 changed files with 14 additions and 4 deletions

View file

@ -0,0 +1,13 @@
class BlackBoxWorker
include Sidekiq::Worker
sidekiq_options queue: :black_box, retry: 10, backtrace: true
def perform(site_id, path)
site = Site[site_id]
return true if site.nil? || site.is_banned? || site.is_deleted
BlackBox.tos_violation_check site, path
end
end
# BlackBox.tos_violation_check self, uploaded