From 25e2771fa794a13350e28f883676c3141d50058c Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Wed, 14 Jun 2023 19:52:28 +0000 Subject: [PATCH 1/2] feat: update database config --- app/controllers/api/projects.php | 7 ++++++- composer.lock | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index acf6b19003..6c68e59cc1 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -94,6 +94,7 @@ App::post('/v1/projects') $backups['database_db_fra1_02'] = ['from' => '7:30', 'to' => '8:15']; $backups['database_db_fra1_03'] = ['from' => '10:30', 'to' => '11:15']; $backups['database_db_fra1_04'] = ['from' => '13:30', 'to' => '14:15']; + $backups['database_db_fra1_05'] = ['from' => '16:30', 'to' => '17:15']; $databases = Config::getParam('pools-database', []); @@ -117,7 +118,11 @@ App::post('/v1/projects') } } - $database = $databases[array_rand($databases)]; + if ($index = array_search('database_db_fra1_05', $databases)) { + $database = $databases[$index]; + } else { + $database = $databases[array_rand($databases)]; + } if ($projectId === 'console') { throw new Exception(Exception::PROJECT_RESERVED_PROJECT, "'console' is a reserved project."); diff --git a/composer.lock b/composer.lock index 4510e49ba7..aed1b97dd5 100644 --- a/composer.lock +++ b/composer.lock @@ -3070,16 +3070,16 @@ }, { "name": "matthiasmullie/minify", - "version": "1.3.70", + "version": "1.3.71", "source": { "type": "git", "url": "https://github.com/matthiasmullie/minify.git", - "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b" + "reference": "ae42a47d7fecc1fbb7277b2f2d84c37a33edc3b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/2807d9f9bece6877577ad44acb5c801bb3ae536b", - "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/ae42a47d7fecc1fbb7277b2f2d84c37a33edc3b1", + "reference": "ae42a47d7fecc1fbb7277b2f2d84c37a33edc3b1", "shasum": "" }, "require": { @@ -3129,7 +3129,7 @@ ], "support": { "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.70" + "source": "https://github.com/matthiasmullie/minify/tree/1.3.71" }, "funding": [ { @@ -3137,7 +3137,7 @@ "type": "github" } ], - "time": "2022-12-09T12:56:44+00:00" + "time": "2023-04-25T20:33:03+00:00" }, { "name": "matthiasmullie/path-converter", @@ -5451,16 +5451,16 @@ }, { "name": "twig/twig", - "version": "v3.6.0", + "version": "v3.6.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "106c170d08e8415d78be2d16c3d057d0d108262b" + "reference": "7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/106c170d08e8415d78be2d16c3d057d0d108262b", - "reference": "106c170d08e8415d78be2d16c3d057d0d108262b", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd", + "reference": "7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd", "shasum": "" }, "require": { @@ -5506,7 +5506,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.6.0" + "source": "https://github.com/twigphp/Twig/tree/v3.6.1" }, "funding": [ { @@ -5518,7 +5518,7 @@ "type": "tidelift" } ], - "time": "2023-05-03T19:06:57+00:00" + "time": "2023-06-08T12:52:13+00:00" } ], "aliases": [], From 4c68e396c18fbbcab545d212f0aab55481b9740e Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 15 Jun 2023 14:35:15 +0000 Subject: [PATCH 2/2] feat: update backup time --- app/controllers/api/projects.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 6c68e59cc1..88abe38adf 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -94,7 +94,7 @@ App::post('/v1/projects') $backups['database_db_fra1_02'] = ['from' => '7:30', 'to' => '8:15']; $backups['database_db_fra1_03'] = ['from' => '10:30', 'to' => '11:15']; $backups['database_db_fra1_04'] = ['from' => '13:30', 'to' => '14:15']; - $backups['database_db_fra1_05'] = ['from' => '16:30', 'to' => '17:15']; + $backups['database_db_fra1_05'] = ['from' => '4:30', 'to' => '5:15']; $databases = Config::getParam('pools-database', []);