Class: Dynflow::Connectors::Direct
- Defined in:
- lib/dynflow/connectors/direct.rb
Defined Under Namespace
Classes: Core
Instance Method Summary collapse
-
#initialize(world = nil) ⇒ Direct
constructor
A new instance of Direct.
- #prune_undeliverable_envelopes(_world) ⇒ Object
- #send(envelope) ⇒ Object
- #start_listening(world) ⇒ Object
- #stop_listening(world, timeout = nil) ⇒ Object
- #stop_receiving_new_work(world, timeout = nil) ⇒ Object
Methods inherited from Abstract
Constructor Details
Instance Method Details
#prune_undeliverable_envelopes(_world) ⇒ Object
72 73 74 75 |
# File 'lib/dynflow/connectors/direct.rb', line 72 def prune_undeliverable_envelopes(_world) # This is a noop 0 end |
#send(envelope) ⇒ Object
67 68 69 70 |
# File 'lib/dynflow/connectors/direct.rb', line 67 def send(envelope) Telemetry.with_instance { |t| t.increment_counter(:dynflow_connector_envelopes, 1, :world => envelope.sender_id) } @core.ask([:handle_envelope, envelope]) end |
#start_listening(world) ⇒ Object
55 56 57 |
# File 'lib/dynflow/connectors/direct.rb', line 55 def start_listening(world) @core.ask([:start_listening, world]) end |
#stop_listening(world, timeout = nil) ⇒ Object
63 64 65 |
# File 'lib/dynflow/connectors/direct.rb', line 63 def stop_listening(world, timeout = nil) @core.ask([:stop_listening, world]).wait(timeout) end |
#stop_receiving_new_work(world, timeout = nil) ⇒ Object
59 60 61 |
# File 'lib/dynflow/connectors/direct.rb', line 59 def stop_receiving_new_work(world, timeout = nil) @core.ask([:stop_receiving_new_work, world]).wait(timeout) end |