Class: GroundControl::Inertia::BulkRetriesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/ground_control/inertia/bulk_retries_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



6
7
8
9
10
11
12
# File 'app/controllers/ground_control/inertia/bulk_retries_controller.rb', line 6

def create
  jobs = ActiveJob.jobs.where(**@job_filters).failed
  count = [jobs.count, 3000].min
  jobs.limit(3000).retry_all

  redirect_to ground_control_inertia.jobs_path(status: :failed), notice: "Retried #{count} jobs"
end