Module: Dynflow::Dispatcher::ClientDispatcher::TrackedRequest
- Defined in:
- lib/dynflow/dispatcher/client_dispatcher.rb
Instance Method Summary collapse
Instance Method Details
#accept! ⇒ Object
12 13 14 15 |
# File 'lib/dynflow/dispatcher/client_dispatcher.rb', line 12 def accept! accepted.fulfill true unless accepted.resolved? self end |
#fail!(error) ⇒ Object
17 18 19 20 21 |
# File 'lib/dynflow/dispatcher/client_dispatcher.rb', line 17 def fail!(error) accepted.reject error unless accepted.resolved? finished.reject error self end |
#success!(resolve_to) ⇒ Object
23 24 25 26 27 |
# File 'lib/dynflow/dispatcher/client_dispatcher.rb', line 23 def success!(resolve_to) accepted.fulfill true unless accepted.resolved? finished.fulfill(resolve_to) self end |