mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
init::pools replica addition
This commit is contained in:
@@ -532,6 +532,12 @@ $register->set('pools', function () {
|
||||
'multiple' => true,
|
||||
'schemes' => ['mariadb', 'mysql'],
|
||||
],
|
||||
'replica' => [
|
||||
'type' => 'database',
|
||||
'dsns' => App::getEnv('_APP_CONNECTIONS_DB_REPLICAS', $fallbackForDB),
|
||||
'multiple' => true,
|
||||
'schemes' => ['mysql'],
|
||||
],
|
||||
'queue' => [
|
||||
'type' => 'queue',
|
||||
'dsns' => App::getEnv('_APP_CONNECTIONS_QUEUE', $fallbackForRedis),
|
||||
|
||||
@@ -65,7 +65,7 @@ class Backup extends Action
|
||||
try {
|
||||
$attempts++;
|
||||
$pools
|
||||
->get('database_' . $database)
|
||||
->get('replica_' . $database)
|
||||
->pop()
|
||||
->getResource();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user