mirror of
https://github.com/appwrite/appwrite
synced 2026-05-15 04:59:01 +00:00
reset worker
This commit is contained in:
parent
2fb9ebe71d
commit
d7d69b63a8
1 changed files with 2 additions and 8 deletions
|
|
@ -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();
|
||||
Loading…
Reference in a new issue