예제 #1
0
 /**
  * @param ContextInterface $context
  * @param StepExecutor     $executor
  *
  * @return \Closure
  */
 protected function exportCallback(ContextInterface $context, StepExecutor $executor)
 {
     return function () use($executor) {
         flush();
         $executor->execute();
     };
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function doExecute(StepExecution $stepExecution)
 {
     $this->initializeStepComponents($stepExecution);
     $stepExecutor = new StepExecutor();
     $stepExecutor->setReader($this->reader)->setProcessor($this->processor)->setWriter($this->writer);
     if (null !== $this->batchSize) {
         $stepExecutor->setBatchSize($this->batchSize);
     }
     $stepExecutor->execute($this);
 }