Class: Airflow::Runner::Poller
- Inherits:
-
Object
- Object
- Airflow::Runner::Poller
- Defined in:
- lib/async_flow/runner.rb
Instance Attribute Summary collapse
-
#is_workflow_task ⇒ Object
Returns the value of attribute is_workflow_task.
Instance Method Summary collapse
-
#initialize(persistence) ⇒ Poller
constructor
A new instance of Poller.
- #next_task {|task| ... } ⇒ Object
Constructor Details
#initialize(persistence) ⇒ Poller
Returns a new instance of Poller.
11 12 13 14 |
# File 'lib/async_flow/runner.rb', line 11 def initialize(persistence) @persistence = persistence @queue = Queue.new end |
Instance Attribute Details
#is_workflow_task ⇒ Object
Returns the value of attribute is_workflow_task.
9 10 11 |
# File 'lib/async_flow/runner.rb', line 9 def is_workflow_task @is_workflow_task end |
Instance Method Details
#next_task {|task| ... } ⇒ Object
16 17 18 19 20 21 |
# File 'lib/async_flow/runner.rb', line 16 def next_task task = persistence.next_task(is_workflow_task: is_workflow_task) yield(task) if task # TODO: Add db notification sleep(1) end |