diff --git a/app/worker.php b/app/worker.php index 6fdb49d35a..06dc4c44d8 100644 --- a/app/worker.php +++ b/app/worker.php @@ -62,7 +62,13 @@ Server::setResource('project', function (Message $message, Database $dbForPlatfo return $project; } - return $dbForPlatform->getDocument('projects', $project->getId()); + // 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([]); + } + }, ['message', 'dbForPlatform']); Server::setResource('dbForProject', function (Cache $cache, Registry $register, Message $message, Document $project, Database $dbForPlatform) {