Skip to content

Commit

Permalink
Merge pull request #6254 from laboro/revert-6227-fix/CRM-4744
Browse files Browse the repository at this point in the history
Revert "CRM-4744: Optimize performance of the Magento sync for one day period"
  • Loading branch information
alex-n-2k7 committed Dec 16, 2015
2 parents 4875f9c + 2fe503d commit fa66991
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 50 deletions.
14 changes: 0 additions & 14 deletions src/Oro/Bundle/BatchBundle/Step/ItemStep.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ public function doExecute(StepExecution $stepExecution)

$stepExecutor->execute($this);
$this->flushStepElements();

$this->restoreStepElements();
}

/**
Expand Down Expand Up @@ -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();
}
}
}
}
17 changes: 0 additions & 17 deletions src/Oro/Bundle/BatchBundle/Step/StepExecutionRestoreInterface.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

use Doctrine\ORM\EntityManager;

use Oro\Bundle\BatchBundle\Step\StepExecutionRestoreInterface;

use Oro\Bundle\ImportExportBundle\Context\ContextRegistry;
use Oro\Bundle\IntegrationBundle\Event\WriterErrorEvent;
use Oro\Bundle\IntegrationBundle\Event\WriterAfterFlushEvent;
Expand All @@ -21,10 +19,7 @@
use Akeneo\Bundle\BatchBundle\Item\InvalidItemException;
use Akeneo\Bundle\BatchBundle\Step\StepExecutionAwareInterface;

class PersistentBatchWriter implements
ItemWriterInterface,
StepExecutionAwareInterface,
StepExecutionRestoreInterface
class PersistentBatchWriter implements ItemWriterInterface, StepExecutionAwareInterface
{
/** @var RegistryInterface */
protected $registry;
Expand All @@ -41,9 +36,6 @@ class PersistentBatchWriter implements
/** @var LoggerInterface */
protected $logger;

/** @var StepExecution|null */
protected $previousStepExecution;

/**
* @param RegistryInterface $registry
* @param EventDispatcherInterface $eventDispatcher
Expand Down Expand Up @@ -132,16 +124,6 @@ public function write(array $items)
*/
public function setStepExecution(StepExecution $stepExecution)
{
$this->previousStepExecution = $this->stepExecution;

$this->stepExecution = $stepExecution;
}

/**
* {@inheritdoc}
*/
public function restoreStepExecution()
{
$this->stepExecution = $this->previousStepExecution;
}
}

0 comments on commit fa66991

Please sign in to comment.