* Move recipe processing code in the worker; * Refactor CLI and use the the worker; * Implement Recipe#tasks and remove tasks application during evaluation, tasks are now applied by the worker after all evaluations are done.
14 lines
217 B
Ruby
14 lines
217 B
Ruby
module Producer
|
|
module Core
|
|
class Worker
|
|
def process(tasks)
|
|
tasks.each { |t| process_task t }
|
|
end
|
|
|
|
def process_task(task)
|
|
task.actions.each(&:apply)
|
|
end
|
|
end
|
|
end
|
|
end
|