Class: SolidQueueWeb::FailedJobsController
Constant Summary
ApplicationController::PERIOD_DURATIONS
Instance Method Summary
collapse
Instance Method Details
#destroy ⇒ Object
16
17
18
19
20
21
|
# File 'app/controllers/solid_queue_web/failed_jobs_controller.rb', line 16
def destroy
executions = params[:id] ? [SolidQueue::FailedExecution.find(params[:id])] : filtered_scope.to_a
perform_discard(executions)
rescue => e
redirect_to failed_jobs_path, alert: "Could not discard job: #{e.message}"
end
|
#index ⇒ Object
5
6
7
8
9
10
11
12
13
14
|
# File 'app/controllers/solid_queue_web/failed_jobs_controller.rb', line 5
def index
respond_to do |format|
format.html { @pagy, @failed_jobs = pagy(filtered_scope.order(created_at: :desc)) }
format.csv do
send_data failed_jobs_csv,
filename: "failed-jobs-#{Date.today}.csv",
type: "text/csv", disposition: "attachment"
end
end
end
|