Module: RigidWorkflow
- Defined in:
- lib/rigid_workflow.rb,
lib/rigid_workflow/engine.rb,
lib/rigid_workflow/version.rb,
lib/rigid_workflow/activity.rb,
lib/rigid_workflow/workflow.rb,
app/models/rigid_workflow/run.rb,
app/models/rigid_workflow/step.rb,
lib/rigid_workflow/step_result.rb,
lib/rigid_workflow/id_generator.rb,
lib/rigid_workflow/orchestrator.rb,
app/models/rigid_workflow/signal.rb,
app/jobs/rigid_workflow/timer_job.rb,
lib/rigid_workflow/workflow_runner.rb,
app/jobs/rigid_workflow/activity_job.rb,
app/jobs/rigid_workflow/workflow_job.rb,
app/helpers/rigid_workflow/runs_helper.rb,
app/models/rigid_workflow/step_attempt.rb,
app/helpers/rigid_workflow/workflows_helper.rb,
app/controllers/rigid_workflow/runs_controller.rb,
lib/generators/rigid_workflow/install_generator.rb,
lib/generators/rigid_workflow/activity_generator.rb,
lib/generators/rigid_workflow/workflow_generator.rb,
app/controllers/rigid_workflow/workflows_controller.rb,
app/controllers/rigid_workflow/application_controller.rb
Overview
Namespace for RigidWorkflow controllers.
Defined Under Namespace
Modules: Generators, RunsHelper, WorkflowsHelper Classes: Activity, ActivityFailedError, ActivityJob, ApplicationController, Configuration, DuplicateNameError, Engine, Error, IdGenerator, NestedBlockError, Orchestrator, Run, RunsController, Signal, Step, StepAttempt, StepResult, TimerJob, Workflow, WorkflowJob, WorkflowRunner, WorkflowsController
Constant Summary collapse
- VERSION =
"1.0.0"
Class Method Summary collapse
-
.config ⇒ Configuration
Returns the current configuration.
- .configure {|config| ... } ⇒ Object
-
.instrument(event_name, payload = {}, &block) ⇒ Object
Instrument a RigidWorkflow event.
-
.on(event_name) {|payload| ... } ⇒ Object
Subscribe to RigidWorkflow events.
Class Method Details
.config ⇒ Configuration
Returns the current configuration
27 28 29 |
# File 'lib/rigid_workflow.rb', line 27 def self.config @config ||= Configuration.new(nil, 3, 15.seconds) end |
.configure {|config| ... } ⇒ Object
32 33 34 |
# File 'lib/rigid_workflow.rb', line 32 def self.configure yield config end |
.instrument(event_name, payload = {}, &block) ⇒ Object
Instrument a RigidWorkflow event
58 59 60 61 62 63 64 |
# File 'lib/rigid_workflow.rb', line 58 def self.instrument(event_name, payload = {}, &block) ActiveSupport::Notifications.instrument( "#{event_name}.rigid_workflow", payload, &block ) end |
.on(event_name) {|payload| ... } ⇒ Object
Subscribe to RigidWorkflow events
47 48 49 50 51 52 53 |
# File 'lib/rigid_workflow.rb', line 47 def self.on(event_name, &block) ActiveSupport::Notifications.subscribe( "#{event_name}.rigid_workflow" ) do |*args| block.call(ActiveSupport::Notifications::Event.new(*args).payload) end end |