Class: MissionControl::Jobs::BulkDiscardsController

Inherits:
ApplicationController show all
Includes:
FailedJobsBulkOperations
Defined in:
app/controllers/mission_control/jobs/bulk_discards_controller.rb

Constant Summary

Constants included from FailedJobsBulkOperations

FailedJobsBulkOperations::MAX_NUMBER_OF_JOBS_FOR_BULK_OPERATIONS

Instance Method Summary collapse

Instance Method Details

#createObject



4
5
6
7
8
9
# File 'app/controllers/mission_control/jobs/bulk_discards_controller.rb', line 4

def create
  jobs_to_discard_count = jobs_to_discard.count
  jobs_to_discard.discard_all

  redirect_to application_jobs_url(@application, :failed), notice: "Discarded #{jobs_to_discard_count} jobs"
end