feat: update worker class
This commit is contained in:
parent
7844a74c1a
commit
7c9d8fcf64
2 changed files with 3 additions and 3 deletions
|
@ -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 [
|
||||||
|
|
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue