Class: DurableFlow::WorkflowWait
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- DurableFlow::WorkflowWait
- Includes:
- Live::Broadcastable
- Defined in:
- lib/durable_flow/models/workflow_wait.rb
Instance Method Summary collapse
Instance Method Details
#live_snapshot ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/durable_flow/models/workflow_wait.rb', line 23 def live_snapshot { id: id, workflow_run_id: workflow_run_id, workflow_step_id: workflow_step_id, workflow_event_id: workflow_event_id, event_name: event_name, status: status, match: self.match, timeout_at: timeout_at, created_at: created_at, updated_at: updated_at, } end |
#match_value ⇒ Object
15 16 17 |
# File 'lib/durable_flow/models/workflow_wait.rb', line 15 def match_value Serializer.load(self.match) end |
#matches_event?(event) ⇒ Boolean
19 20 21 |
# File 'lib/durable_flow/models/workflow_wait.rb', line 19 def matches_event?(event) event.name == event_name && event.matches_payload?(match_value) end |