fix: [tools:backgroundjob] Support of legacy systems (2)

pull/8008/head
Sami Mokaddem 2021-11-23 14:33:42 +01:00 committed by Sami Mokaddem
parent 4bd337eb42
commit dc99aad950
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 2 additions and 4 deletions

View File

@ -212,10 +212,9 @@ class BackgroundJobsTool
* Must be less than your configured `read_write_timeout` * Must be less than your configured `read_write_timeout`
* for the redis connection. * for the redis connection.
* *
* @return BackgroundJob|null.
* @throws Exception * @throws Exception
*/ */
public function dequeue($queue, int $timeout = 30): ?BackgroundJob public function dequeue($queue, int $timeout = 30)
{ {
$this->validateQueue($queue); $this->validateQueue($queue);
@ -233,10 +232,9 @@ class BackgroundJobsTool
* *
* @param string $jobId Background Job Id. * @param string $jobId Background Job Id.
* *
* @return BackgroundJob|null job status.
* *
*/ */
public function getJob(string $jobId): ?BackgroundJob public function getJob(string $jobId)
{ {
$rawJob = $this->RedisConnection->get( $rawJob = $this->RedisConnection->get(
self::JOB_STATUS_PREFIX . ':' . $jobId self::JOB_STATUS_PREFIX . ':' . $jobId