Merge remote-tracking branch 'origin/main'
# Conflicts: # app/controllers/api/projects.php
This commit is contained in:
commit
76e2b39c1a
1 changed files with 8 additions and 5 deletions
|
@ -100,7 +100,11 @@ App::post('/v1/projects')
|
|||
$backups['database_db_fra1_v14x_07'] = ['from' => '00:00', 'to' => '02:00'];
|
||||
|
||||
$databases = Config::getParam('pools-database', []);
|
||||
|
||||
$databaseSelfHosted = 'database_db_fra1_self_hosted_0_0';
|
||||
$index = array_search($databaseSelfHosted, $databases);
|
||||
if ($index !== false) {
|
||||
unset($databases[$index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove databases from the list that are currently undergoing an backup
|
||||
|
@ -175,10 +179,9 @@ App::post('/v1/projects')
|
|||
* Update database with self-managed db every $mod projects
|
||||
*/
|
||||
$mod = 20;
|
||||
$index = array_search('database_db_fra1_self_hosted_0_0', $databases);
|
||||
if ($index !== false && ($project->getInternalId() % $mod === 0)) {
|
||||
$database = $databases[$index];
|
||||
$project->setAttribute('database', $database);
|
||||
$index = in_array($databaseSelfHosted, $databases);
|
||||
if ($project->getInternalId() % $mod === 0 && $index !== false) {
|
||||
$project->setAttribute('database', $databaseSelfHosted);
|
||||
$dbForConsole->updateDocument('projects', $project);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue