/** * {@inheritdoc} */ public function purge($jobInstanceCode) { $jobInstance = $this->jobInstanceRepository->findOneByCode($jobInstanceCode); if (null === $jobInstance) { throw new EntityNotFoundException(sprintf('Job instance %s hasn\'t been found, verify your code.', $jobInstanceCode)); } $jobId = $jobInstance->getId(); foreach ($this->classesToPurge as $class) { $this->purgeDelta($jobId, $class); } }
/** * Remove mapping from database. * * @param string $jobInstanceCode * * @throws EntityNotFoundException */ public function purge($jobInstanceCode) { $jobInstance = $this->jobInstanceRepository->findOneByCode($jobInstanceCode); if (null === $jobInstance) { throw new EntityNotFoundException(sprintf('Job instance %s hasn\'t been found, verify your code.', $jobInstanceCode)); } $rawConfiguration = $jobInstance->getRawConfiguration(); $soapUrl = $rawConfiguration['magentoUrl'] . $rawConfiguration['wsdlUrl']; foreach ($this->classesToPurge as $class) { $this->purgeMapping($soapUrl, $class); } }