Class: FailedJobs::ArgumentsController
- Inherits:
-
SolidQueueWeb::ApplicationController
- Object
- ActionController::Base
- SolidQueueWeb::ApplicationController
- FailedJobs::ArgumentsController
- Defined in:
- app/controllers/solid_queue_web/failed_jobs/arguments_controller.rb
Constant Summary
Constants inherited from SolidQueueWeb::ApplicationController
SolidQueueWeb::ApplicationController::PERIOD_DURATIONS, SolidQueueWeb::ApplicationController::STAGGER_INTERVALS
Instance Method Summary collapse
Instance Method Details
#update ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'app/controllers/solid_queue_web/failed_jobs/arguments_controller.rb', line 3 def update execution = SolidQueue::FailedExecution.find(params[:failed_job_id]) new_arguments = JSON.parse(params[:arguments]) execution.job.update!(arguments: new_arguments) execution.retry redirect_to failed_jobs_path, notice: "Job arguments updated and queued for retry." rescue JSON::ParserError redirect_to job_path(execution.job), alert: "Invalid JSON: could not parse arguments." rescue => e redirect_to failed_jobs_path, alert: "Could not update job: #{e.}" end |