mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 01:18:37 +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;
|
return $project;
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOT all workers need valid DB config so we return empty if this fails
|
return $dbForPlatform->getDocument('projects', $project->getId());
|
||||||
try {
|
|
||||||
return $dbForPlatform->getDocument('projects', $project->getId());
|
|
||||||
} catch (\Throwable $e) {
|
|
||||||
return new Document([]);
|
|
||||||
}
|
|
||||||
|
|
||||||
}, ['message', 'dbForPlatform']);
|
}, ['message', 'dbForPlatform']);
|
||||||
|
|
||||||
Server::setResource('dbForProject', function (Cache $cache, Registry $register, Message $message, Document $project, Database $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");
|
Console::info("Worker $workerName started");
|
||||||
});
|
});
|
||||||
|
|
||||||
$worker->start();
|
$worker->start();
|
||||||
Loading…
Reference in a new issue