示例#1
0
 /**
  * Reset job.
  *
  * @param string $queue
  *
  * @throws JobConfigurationException
  */
 public function reset($queue)
 {
     if (!function_exists('posix_getsid')) {
         throw new JobConfigurationException('Function posix_getsid don\'t exists');
     }
     $configurations = $this->configurationManager->findPotentialDeadJobs($this->getNextStartWithTimeout(), $queue);
     foreach ($configurations as $configuration) {
         if ($this->restoreManager->reset($configuration)) {
             $this->configurationManager->save();
             break;
         }
     }
 }
 /**
  * On success.
  */
 public function onSuccess()
 {
     $this->manager->save();
 }
 /**
  * On success.
  *
  * @return array
  */
 public function onSuccess()
 {
     $this->manager->save();
     return ['title' => $this->translator->trans('success.delete_configuration', [], 'AurejaJobQueue'), 'type' => 'success'];
 }