コード例 #1
0
 public function jobqueueExecute($jobId)
 {
     $this->queuedJobService->checkJobHealth();
     $job = DataList::create('QueuedJobDescriptor')->byID($jobId);
     if ($job) {
         // check that we're not trying to execute something tooo soon
         if (strtotime($job->StartAfter) > time()) {
             return;
         }
         $this->queuedJobService->runJob($jobId);
     }
 }
コード例 #2
0
 /**
  * @param QueuedJobDescriptor $job
  */
 public function startJobOnQueue(QueuedJobDescriptor $job)
 {
     $this->queuedJobService->runJob($job->ID);
 }