From d7d69b63a8f95eefc895a532079fbc56ea741045 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 17 Dec 2024 14:15:27 +0000 Subject: [PATCH] reset worker --- app/worker.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/worker.php b/app/worker.php index fd9681b37e..563a801b6b 100644 --- a/app/worker.php +++ b/app/worker.php @@ -62,13 +62,7 @@ Server::setResource('project', function (Message $message, Database $dbForPlatfo return $project; } - // NOT all workers need valid DB config so we return empty if this fails - try { - return $dbForPlatform->getDocument('projects', $project->getId()); - } catch (\Throwable $e) { - return new Document([]); - } - + return $dbForPlatform->getDocument('projects', $project->getId()); }, ['message', 'dbForPlatform']); Server::setResource('dbForProject', function (Cache $cache, Registry $register, Message $message, Document $project, Database $dbForPlatform) { @@ -435,4 +429,4 @@ $worker->workerStart() Console::info("Worker $workerName started"); }); -$worker->start(); +$worker->start(); \ No newline at end of file