Method: Attr::Gather::Workflow::TaskGraph#each_batch
- Defined in:
- lib/attr/gather/workflow/task_graph.rb
#each_batch ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/attr/gather/workflow/task_graph.rb', line 43 def each_batch return enum_for(:each_batch) unless block_given? to_execute = tsort until to_execute.empty? batch = to_execute.take_while do |task| task.fullfilled_given_remaining_tasks?(to_execute) end to_execute -= batch validate_finishable!(batch, to_execute) yield batch end end |