reset worker

This commit is contained in:
Damodar Lohani 2024-12-17 14:15:27 +00:00
parent 2fb9ebe71d
commit d7d69b63a8

View file

@ -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();