From 7d029adb737a64638da1a460bfdddce739071c94 Mon Sep 17 00:00:00 2001 From: Roly Gutierrez Date: Thu, 5 Sep 2024 12:13:48 -0400 Subject: [PATCH] FOUR-17365 39399 - Fidelity Bank Performance, queries constantly running --- ProcessMaker/Managers/TaskSchedulerManager.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ProcessMaker/Managers/TaskSchedulerManager.php b/ProcessMaker/Managers/TaskSchedulerManager.php index c7a5ad41e7..d866ec421d 100644 --- a/ProcessMaker/Managers/TaskSchedulerManager.php +++ b/ProcessMaker/Managers/TaskSchedulerManager.php @@ -138,10 +138,14 @@ public function scheduleTasks() { $today = $this->today(); try { - if (!Schema::hasTable('scheduled_tasks')) { - return; - } - + /** + * This validation is removed; the database schema should exist before + * any initiation of 'jobs' and 'schedule'. + * + * if (!Schema::hasTable('scheduled_tasks')) { + * return; + * } + */ $this->removeExpiredLocks(); $tasks = ScheduledTask::cursor(); @@ -202,7 +206,7 @@ public function scheduleTasks() } } } catch (PDOException $e) { - Log::error('The connection to the database had problems'); + Log::error('The connection to the database had problems (scheduleTasks): ' . $e->getMessage()); } }