Class: IOPromise::Faraday::ContinuableHydra
- Inherits:
-
Typhoeus::Hydra
- Object
- Typhoeus::Hydra
- IOPromise::Faraday::ContinuableHydra
- Defined in:
- lib/iopromise/faraday/continuable_hydra.rb
Class Method Summary collapse
Instance Method Summary collapse
- #execute_continue ⇒ Object
-
#initialize(options = {}) ⇒ ContinuableHydra
constructor
A new instance of ContinuableHydra.
- #iop_handler=(iop_handler) ⇒ Object
- #socket_is_ready(io, readable, writable) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ ContinuableHydra
Returns a new instance of ContinuableHydra.
15 16 17 18 19 |
# File 'lib/iopromise/faraday/continuable_hydra.rb', line 15 def initialize( = {}) super() @multi = MultiSocketAction.new(.reject{|k,_| k==:max_concurrency}) end |
Class Method Details
.for_current_thread ⇒ Object
10 11 12 |
# File 'lib/iopromise/faraday/continuable_hydra.rb', line 10 def for_current_thread Thread.current[:faraday_promise_typhoeus_hydra] ||= new end |
Instance Method Details
#execute_continue ⇒ Object
29 30 31 32 33 34 |
# File 'lib/iopromise/faraday/continuable_hydra.rb', line 29 def execute_continue # fill up the curl easy handle as much as possible dequeue_many @multi.execute_continue end |
#iop_handler=(iop_handler) ⇒ Object
21 22 23 |
# File 'lib/iopromise/faraday/continuable_hydra.rb', line 21 def iop_handler=(iop_handler) @multi.iop_handler = iop_handler end |
#socket_is_ready(io, readable, writable) ⇒ Object
25 26 27 |
# File 'lib/iopromise/faraday/continuable_hydra.rb', line 25 def socket_is_ready(io, readable, writable) @multi.socket_is_ready(io, readable, writable) end |