Module: JobWorkflow::Monitoring
- Defined in:
- lib/job_workflow/monitoring.rb,
lib/job_workflow/monitoring/engine.rb,
lib/job_workflow/monitoring/dag_layout.rb,
lib/job_workflow/monitoring/execution_page.rb,
lib/job_workflow/monitoring/parameter_filter.rb,
lib/job_workflow/monitoring/workflow_registry.rb,
lib/job_workflow/monitoring/execution_registry.rb,
lib/job_workflow/monitoring/workflow_definition.rb,
lib/job_workflow/monitoring/execution_view_model.rb,
app/controllers/job_workflow/monitoring/workflows_controller.rb,
app/controllers/job_workflow/monitoring/executions_controller.rb,
app/controllers/job_workflow/monitoring/application_controller.rb
Defined Under Namespace
Classes: ApplicationController, DagLayout, Engine, ExecutionPage, ExecutionRegistry, ExecutionViewModel, ExecutionsController, ParameterFilter, WorkflowDefinition, WorkflowRegistry, WorkflowsController
Class Method Summary collapse
-
.configure_engine_config(config) ⇒ Object
: (untyped config) -> void.
-
.mission_control_job_path(job_id, status: nil) ⇒ Object
: (String?, Symbol?) -> String?.
-
.resolved_base_controller_class ⇒ Object
: () -> String.
-
.workflows ⇒ Object
: () -> Array.
Class Method Details
.configure_engine_config(config) ⇒ Object
: (untyped config) -> void
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/job_workflow/monitoring.rb', line 45 def configure_engine_config(config) config.job_workflow = ActiveSupport::OrderedOptions.new unless config.try(:job_workflow) config.job_workflow.monitoring ||= ActiveSupport::OrderedOptions.new config.before_initialize do config.job_workflow.monitoring.each do |key, value| JobWorkflow::Monitoring.public_send("#{key}=", value) end end end |
.mission_control_job_path(job_id, status: nil) ⇒ Object
: (String?, Symbol?) -> String?
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/job_workflow/monitoring.rb', line 22 def mission_control_job_path(job_id, status: nil) return if job_id.nil? path_template = mission_control_job_route_path return if path_template.nil? path = path_template.sub(":id", job_id.to_s) path += "#error" if status == :failed path end |
.resolved_base_controller_class ⇒ Object
: () -> String
34 35 36 37 38 39 40 41 42 |
# File 'lib/job_workflow/monitoring.rb', line 34 def resolved_base_controller_class return base_controller_class if base_controller_class.present? mission_control_base_controller_class = defined?(MissionControl::Jobs) && MissionControl::Jobs.base_controller_class return mission_control_base_controller_class if mission_control_base_controller_class.present? "::ApplicationController" end |
.workflows ⇒ Object
: () -> Array
17 18 19 |
# File 'lib/job_workflow/monitoring.rb', line 17 def workflows WorkflowRegistry.all.map { |job_class| WorkflowDefinition.new(job_class:) } end |