/** * @param JobGraph $graph */ public function shouldContinue($graph) { return !$this->isTerminated() && ($graph->hasNextJob() || $this->context->shouldRequeue()); }
/** * From the IO, create the first message(s) to initialize the job and then run its execution */ protected function init(JobInterface $job, JobGraph $graph, Io\IoDescriptor $io = null) { $contexts = []; $inputs = $this->buildInputs($io); foreach ($inputs as $input) { $contexts[] = $this->ctxFactory->create($job, $input, $graph->current()); } $msgs = $this->msgFactory->createInitMsgs($contexts); foreach ($msgs as $msg) { $this->push($msg); } }
public function initGraph(JobGraph $graph) { $graph->move($this->current); }