Class: MaintenanceTasks::RunsController Private
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- MaintenanceTasks::RunsController
- Defined in:
- app/controllers/maintenance_tasks/runs_controller.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class communicates with the Run model to persist info related to task runs. It defines actions for creating and pausing runs.
Constant Summary
Constants inherited from ApplicationController
ApplicationController::BULMA_CDN
Instance Method Summary collapse
-
#cancel ⇒ Object
private
Updates a Run status to cancelling.
-
#pause ⇒ Object
private
Updates a Run status to paused.
Instance Method Details
#cancel ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Updates a Run status to cancelling.
20 21 22 23 24 25 |
# File 'app/controllers/maintenance_tasks/runs_controller.rb', line 20 def cancel @run.cancel redirect_to(task_path(@run.task_name)) rescue ActiveRecord::RecordInvalid => error redirect_to(task_path(@run.task_name), alert: error.) end |
#pause ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Updates a Run status to paused.
12 13 14 15 16 17 |
# File 'app/controllers/maintenance_tasks/runs_controller.rb', line 12 def pause @run.pausing! redirect_to(task_path(@run.task_name)) rescue ActiveRecord::RecordInvalid => error redirect_to(task_path(@run.task_name), alert: error.) end |