mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
connection debug
This commit is contained in:
@@ -61,14 +61,19 @@ class Backup extends Action
|
||||
$max = 10;
|
||||
$sleep = 5;
|
||||
|
||||
$resource = $pools
|
||||
->get('replica_' . $database)
|
||||
->pop()
|
||||
->getResource();
|
||||
var_dump($resource);
|
||||
|
||||
do {
|
||||
try {
|
||||
$attempts++;
|
||||
$resource = $pools
|
||||
$pools
|
||||
->get('replica_' . $database)
|
||||
->pop()
|
||||
->getResource();
|
||||
var_dump($resource);
|
||||
break; // leave the do-while if successful
|
||||
} catch (Exception $e) {
|
||||
Console::warning("Database not ready. Retrying connection ({$attempts})...");
|
||||
|
||||
Reference in New Issue
Block a user