Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function release(ManagerInterface $manager, $delay = 0)
 {
     $this->iron->releaseMessage($manager->getQueue(), $manager->getIronJob()->id, $delay);
     return true;
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  *
  * @param integer|null $priority
  */
 public function release(ManagerInterface $manager, $delay = 0, $priority = PheanstalkInterface::DEFAULT_PRIORITY)
 {
     $this->pheanstalk->release($manager->getPheanstalkJob(), $priority, $delay);
     return true;
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function execute(ManagerInterface $manager)
 {
     $payload = $manager->getPayload();
     $closure = unserialize($payload['closure']);
     return $closure($manager);
 }
Ejemplo n.º 4
0
 /**
  * {@inheritdoc}
  */
 public function release(ManagerInterface $manager, $delay = 0)
 {
     $payload = $manager->getPayload();
     $payload['attempts'] = isset($payload['attempts']) ? $payload['attempts'] + 1 : 2;
     $this->delete($manager);
     $job = Job::createFromPayload($payload);
     if ($delay > 0) {
         $this->delayed($manager->getQueue(), $delay, $job);
     } else {
         $this->push($manager->getQueue(), $job);
     }
     return true;
 }