jobs: migrate bulk reverts to ActiveJob.
This commit is contained in:
@@ -15,7 +15,7 @@ module Moderator
|
||||
@bulk_revert.preview
|
||||
render action: "new"
|
||||
else
|
||||
@bulk_revert.delay(:queue => "default", :priority => 15).process(CurrentUser.user, @constraints)
|
||||
ProcessBulkRevertJob.perform_later(CurrentUser.user, @constraints)
|
||||
flash[:notice] = "Reverts queued"
|
||||
redirect_to new_moderator_bulk_revert_path
|
||||
end
|
||||
|
||||
8
app/jobs/process_bulk_revert_job.rb
Normal file
8
app/jobs/process_bulk_revert_job.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
class ProcessBulkRevertJob < ApplicationJob
|
||||
queue_as :default
|
||||
queue_with_priority 20
|
||||
|
||||
def perform(creator, constraints)
|
||||
BulkRevert.new.process(creator, constraints)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user