Class: JFlow::Activity::Worker
- Inherits:
-
Object
- Object
- JFlow::Activity::Worker
- Defined in:
- lib/jflow/activity/worker.rb
Instance Attribute Summary collapse
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#tasklist ⇒ Object
readonly
Returns the value of attribute tasklist.
Instance Method Summary collapse
-
#initialize(domain, tasklist) ⇒ Worker
constructor
A new instance of Worker.
- #start! ⇒ Object
Constructor Details
#initialize(domain, tasklist) ⇒ Worker
Returns a new instance of Worker.
7 8 9 10 |
# File 'lib/jflow/activity/worker.rb', line 7 def initialize(domain, tasklist) @domain = domain @tasklist = tasklist end |
Instance Attribute Details
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
5 6 7 |
# File 'lib/jflow/activity/worker.rb', line 5 def domain @domain end |
#tasklist ⇒ Object (readonly)
Returns the value of attribute tasklist.
5 6 7 |
# File 'lib/jflow/activity/worker.rb', line 5 def tasklist @tasklist end |
Instance Method Details
#start! ⇒ Object
12 13 14 15 16 17 |
# File 'lib/jflow/activity/worker.rb', line 12 def start! loop do log "Polling for task on #{domain} - #{tasklist}" poll end end |