Skip to content

Commit 29e0260

Browse files
committed
Changed: Fix findJobById return cached value. This issue can affect dependent job schedule if it is done by other enqueue job
1 parent ca6bd30 commit 29e0260

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/job-queue/Doctrine/JobStorage.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,18 @@ public function findJobById($id)
5858
{
5959
$qb = $this->getEntityRepository()->createQueryBuilder('job');
6060

61-
return $qb
61+
$job = $qb
6262
->addSelect('rootJob')
6363
->leftJoin('job.rootJob', 'rootJob')
6464
->where('job = :id')
6565
->setParameter('id', $id)
6666
->getQuery()->getOneOrNullResult()
6767
;
68+
if ($job) {
69+
$this->refreshJobEntity($job);
70+
}
71+
72+
return $job;
6873
}
6974

7075
/**

0 commit comments

Comments
 (0)