public function JobExecutor::load in Apigee Edge 8
Loads a job from the database.
Parameters
string $id: Job id.
Return value
\Drupal\apigee_edge\Job\Job|null Loaded job object or null if it does not exit.
Overrides JobExecutorInterface::load
File
- src/
JobExecutor.php, line 109
Class
- JobExecutor
- Job executor service.
Namespace
Drupal\apigee_edgeCode
public function load(string $id) : ?Job {
$query = $this->connection
->select('apigee_edge_job', 'j')
->fields('j', [
'job',
]);
$query
->condition('id', $id);
$jobdata = $query
->execute()
->fetchField();
return $jobdata ? unserialize($jobdata) : NULL;
}