Example #1
0
 /**
  * @param JobInterface $job
  * @param GearmanJob $gearmanJob
  * @param Application $root
  * @return mixed
  */
 public function executeJob(JobInterface $job, GearmanJob $gearmanJob, Application $root)
 {
     if ($root->getConfig()->getAutoUpdate() && !$root->isAllowingJob) {
         $root->restart();
         return null;
     }
     $root->isAllowingJob = false;
     if (null !== $root->logger) {
         $root->logger->info("Executing job {$job->getName()}");
     }
     return $job->execute($gearmanJob);
 }