/** * @param ContextInterface $context * @param StepExecutor $executor * * @return \Closure */ protected function exportCallback(ContextInterface $context, StepExecutor $executor) { return function () use($executor) { flush(); $executor->execute(); }; }
/** * {@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); }