Class: Promiscuous::Subscriber::Worker
- Inherits:
-
Object
- Object
- Promiscuous::Subscriber::Worker
- Extended by:
- Autoload
- Defined in:
- lib/promiscuous/subscriber/worker.rb
Defined Under Namespace
Classes: EventualDestroyer, Pump, Recorder, Runner, Stats
Instance Attribute Summary collapse
-
#eventual_destroyer ⇒ Object
Returns the value of attribute eventual_destroyer.
-
#pump ⇒ Object
Returns the value of attribute pump.
-
#runner ⇒ Object
Returns the value of attribute runner.
-
#stats ⇒ Object
Returns the value of attribute stats.
Instance Method Summary collapse
-
#initialize ⇒ Worker
constructor
A new instance of Worker.
- #show_stop_status ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
Methods included from Autoload
Constructor Details
Instance Attribute Details
#eventual_destroyer ⇒ Object
Returns the value of attribute eventual_destroyer.
5 6 7 |
# File 'lib/promiscuous/subscriber/worker.rb', line 5 def eventual_destroyer @eventual_destroyer end |
#pump ⇒ Object
Returns the value of attribute pump.
5 6 7 |
# File 'lib/promiscuous/subscriber/worker.rb', line 5 def pump @pump end |
#runner ⇒ Object
Returns the value of attribute runner.
5 6 7 |
# File 'lib/promiscuous/subscriber/worker.rb', line 5 def runner @runner end |
#stats ⇒ Object
Returns the value of attribute stats.
5 6 7 |
# File 'lib/promiscuous/subscriber/worker.rb', line 5 def stats @stats end |
Instance Method Details
#show_stop_status ⇒ Object
28 29 30 31 32 |
# File 'lib/promiscuous/subscriber/worker.rb', line 28 def show_stop_status @num_show_stop_requests ||= 0 @num_show_stop_requests += 1 @runner.show_stop_status(@num_show_stop_requests) end |
#start ⇒ Object
14 15 16 17 18 19 |
# File 'lib/promiscuous/subscriber/worker.rb', line 14 def start @pump.connect @runner.start @stats.connect @eventual_destroyer.try(:start) end |
#stop ⇒ Object
21 22 23 24 25 26 |
# File 'lib/promiscuous/subscriber/worker.rb', line 21 def stop @stats.disconnect @runner.stop @pump.disconnect @eventual_destroyer.try(:stop) end |