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); } }
/** * @param QueuedJobDescriptor $job */ public function startJobOnQueue(QueuedJobDescriptor $job) { $this->queuedJobService->runJob($job->ID); }