From 2fe503d3c0b4e076e231976d77a3afc6d9b75241 Mon Sep 17 00:00:00 2001 From: Alexander Nezdoiminoga Date: Wed, 16 Dec 2015 17:09:21 +0200 Subject: [PATCH] Revert "CRM-4744: Optimize performance of the Magento sync for one day period" --- src/Oro/Bundle/BatchBundle/Step/ItemStep.php | 14 ------------- .../Step/StepExecutionRestoreInterface.php | 17 ---------------- .../Writer/PersistentBatchWriter.php | 20 +------------------ 3 files changed, 1 insertion(+), 50 deletions(-) delete mode 100644 src/Oro/Bundle/BatchBundle/Step/StepExecutionRestoreInterface.php diff --git a/src/Oro/Bundle/BatchBundle/Step/ItemStep.php b/src/Oro/Bundle/BatchBundle/Step/ItemStep.php index 1b920831119..a9d4a585ee4 100644 --- a/src/Oro/Bundle/BatchBundle/Step/ItemStep.php +++ b/src/Oro/Bundle/BatchBundle/Step/ItemStep.php @@ -32,8 +32,6 @@ public function doExecute(StepExecution $stepExecution) $stepExecutor->execute($this); $this->flushStepElements(); - - $this->restoreStepElements(); } /** @@ -72,16 +70,4 @@ public function flushStepElements() } } } - - /** - * Restores step elements to a state that was before a job execution. - */ - protected function restoreStepElements() - { - foreach ($this->getConfigurableStepElements() as $element) { - if ($element instanceof StepExecutionRestoreInterface) { - $element->restoreStepExecution(); - } - } - } } diff --git a/src/Oro/Bundle/BatchBundle/Step/StepExecutionRestoreInterface.php b/src/Oro/Bundle/BatchBundle/Step/StepExecutionRestoreInterface.php deleted file mode 100644 index 46289724399..00000000000 --- a/src/Oro/Bundle/BatchBundle/Step/StepExecutionRestoreInterface.php +++ /dev/null @@ -1,17 +0,0 @@ -previousStepExecution = $this->stepExecution; - $this->stepExecution = $stepExecution; } - - /** - * {@inheritdoc} - */ - public function restoreStepExecution() - { - $this->stepExecution = $this->previousStepExecution; - } }