Class: JobWorkflow::Monitoring::ExecutionsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- JobWorkflow::Monitoring::ExecutionsController
- Defined in:
- app/controllers/job_workflow/monitoring/executions_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/job_workflow/monitoring/executions_controller.rb', line 6 def index @workflow = WorkflowRegistry.find(params[:workflow_job_class_name]) return render plain: "Workflow definition not found.", status: :not_found if @workflow.nil? @page = ExecutionRegistry.page_for( job_class_name: @workflow.name, cursor: params[:cursor] ) @executions = @page.executions end |
#show ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/job_workflow/monitoring/executions_controller.rb', line 17 def show @workflow = WorkflowRegistry.find(params[:workflow_job_class_name]) return render plain: "Workflow definition not found.", status: :not_found if @workflow.nil? @execution = ExecutionRegistry.find(params[:id]) return if @execution && @execution.job_class_name == @workflow.name render plain: "Workflow execution is no longer available.", status: :not_found end |