public function handle(JobMessage $msg) { $job = $msg->recoverJob($this->jobFactory); $graph = new JobGraph($job); $msg->initGraph($graph); $child = $msg->currentChild($job); $msgs = $msg->createPipeMsgs($job, $graph, $this->ctxFactory, $this->msgFactory); $forceRequeue = $child->getRequeue(); if (true === $forceRequeue || $msg->shouldContinue($graph)) { try { $msgs[] = $msg->createNextMsg($graph, $this->msgFactory, $forceRequeue); } catch (NoMoreMessageException $e) { // We could log it ? } } return $msgs; }
private function createJobExecutionFromMessage(JobMessage $msg) { $job = $msg->recoverJob($this->jobFactory); $graph = $this->buildGraph($job); return $this->executionFactory->create($job, $graph); }