get project db key by region
This commit is contained in:
parent
a60c441d41
commit
81b7f2273f
2 changed files with 7 additions and 0 deletions
|
@ -133,6 +133,7 @@ App::post('/v1/projects')
|
|||
}
|
||||
|
||||
var_dump([
|
||||
'location' => 'Api::projects',
|
||||
'_APP_DATABASE_SHARED_TABLES' => System::getEnv('_APP_DATABASE_SHARED_TABLES', ''),
|
||||
'region' => $region,
|
||||
'dsn' => $dsn,
|
||||
|
|
|
@ -1365,6 +1365,12 @@ App::setResource('getProjectDB', function (Group $pools, Database $dbForConsole,
|
|||
->setMetadata('project', $project->getId())
|
||||
->setTimeout(APP_DATABASE_TIMEOUT_MILLISECONDS);
|
||||
|
||||
var_dump([
|
||||
'location' => 'Init::getProjectDB',
|
||||
'_APP_DATABASE_SHARED_TABLES' => System::getEnv('_APP_DATABASE_SHARED_TABLES', ''),
|
||||
'dsn' => $dsn,
|
||||
]);
|
||||
|
||||
$sharedTablesKeys = explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES', ''));
|
||||
if (in_array($dsn->getHost(), $sharedTablesKeys)) {
|
||||
$database
|
||||
|
|
Loading…
Reference in a new issue