Class: GroundControl::Api::BulkRetriesController
- Inherits:
-
ApplicationController
- Object
- ActionController::API
- ApplicationController
- GroundControl::Api::BulkRetriesController
- Defined in:
- app/controllers/ground_control/api/bulk_retries_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/controllers/ground_control/api/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 render json: { message: "Retried #{count} jobs" } end |