Skip to content

EspoCRM – Open Source CRM Application

Ref

Yuriicb7677a21eaf
diff --git a/application/Espo/Core/Job/JobRunner.php b/application/Espo/Core/Job/JobRunner.php
index 76dbf20181..56d684b0f6 100644
--- a/application/Espo/Core/Job/JobRunner.php
+++ b/application/Espo/Core/Job/JobRunner.php
@@ -81,8 +81,7 @@ class JobRunner
throw new RuntimeException("Empty job ID.");
}
- /** @var ?JobEntity $jobEntity */
- $jobEntity = $this->entityManager->getEntityById(JobEntity::ENTITY_TYPE, $id);
+ $jobEntity = $this->entityManager->getRDBRepositoryByClass(JobEntity::class)->getById($id);
if (!$jobEntity) {
throw new RuntimeException("Job '$id' not found.");
@@ -93,7 +92,6 @@ class JobRunner
}
$this->setJobRunning($jobEntity);
-
$this->run($jobEntity);
}