mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Fixed: [cron] store the last store of executed tasks correctly
This commit is contained in:
@@ -44,7 +44,7 @@ class CronManager implements CronManagerInterface
|
||||
|
||||
private const UPDATE_AFTER_EXEC = 'UPDATE ' . CronJobExecution::class . ' cr SET cr.lastEnd = :now, cr.lastStatus = :status WHERE cr.key = :key';
|
||||
|
||||
private const UPDATE_BEFORE_EXEC = 'UPDATE ' . CronJobExecution::class . ' cr SET cr.lastExecution = :now WHERE cr.key = :key';
|
||||
private const UPDATE_BEFORE_EXEC = 'UPDATE ' . CronJobExecution::class . ' cr SET cr.lastStart = :now WHERE cr.key = :key';
|
||||
|
||||
private CronJobExecutionRepositoryInterface $cronJobExecutionRepository;
|
||||
|
||||
@@ -90,7 +90,8 @@ class CronManager implements CronManagerInterface
|
||||
->setParameters([
|
||||
'now' => new DateTimeImmutable('now'),
|
||||
'key' => $job->getKey(),
|
||||
]);
|
||||
])
|
||||
->execute();
|
||||
} else {
|
||||
$execution = new CronJobExecution($job->getKey());
|
||||
$this->entityManager->persist($execution);
|
||||
|
Reference in New Issue
Block a user