예제 #1
0
 /**
  * @param JobGraph $graph
  */
 public function shouldContinue($graph)
 {
     return !$this->isTerminated() && ($graph->hasNextJob() || $this->context->shouldRequeue());
 }
예제 #2
0
파일: Jobflow.php 프로젝트: rezzza/jobflow
 /**
  * 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);
     }
 }
예제 #3
0
 public function initGraph(JobGraph $graph)
 {
     $graph->move($this->current);
 }