1
0
Fork 0
mirror of synced 2024-10-03 02:37:40 +13:00

feat: update worker class

This commit is contained in:
Christy Jacob 2022-08-24 22:56:30 +05:30
parent 7844a74c1a
commit 7c9d8fcf64
2 changed files with 3 additions and 3 deletions

View file

@ -100,7 +100,7 @@ function getDatabase(Registry &$register, string $projectId)
$database = DatabasePool::wait( $database = DatabasePool::wait(
DatabasePool::getDatabase($pdo->getConnection(), $redis, '_console'), DatabasePool::getDatabase($pdo->getConnection(), $redis, '_console'),
'realtime' 'realtime'
); );
if ($projectId !== 'console') { if ($projectId !== 'console') {
$project = Authorization::skip(fn() => $database->getDocument('projects', $projectId)); $project = Authorization::skip(fn() => $database->getDocument('projects', $projectId));
@ -109,7 +109,7 @@ function getDatabase(Registry &$register, string $projectId)
$database = DatabasePool::wait( $database = DatabasePool::wait(
DatabasePool::getDatabase($pdo->getConnection(), $redis, "_{$project->getInternalId()}"), DatabasePool::getDatabase($pdo->getConnection(), $redis, "_{$project->getInternalId()}"),
'realtime' 'realtime'
); );
} }
return [ return [

View file

@ -86,7 +86,7 @@ $cli
$redis = $register->get('cache'); $redis = $register->get('cache');
$dbPool = $register->get('dbPool'); $dbPool = $register->get('dbPool');
$database = $dbPool->getConsoleDB(); $database = $dbPool->getConsoleDB();
$pdo = $dbPool->getPDO($database); $pdo = $dbPool->getPDO($database);
$database = DatabasePool::wait( $database = DatabasePool::wait(