feat(cluster): add voicemail & fail2ban sync and automatic failback re-sync reconciliation
This commit is contained in:
1 parent
54fc495fa7
commit
d1d42f75b5
5 files changed
+270
-1
No files matched your search
@@ -14,6 +14,15 @@ use App\Database;
|
||||
use App\ClusterManager;
|
||||
|
||||
try {
|
||||
// Mode réconciliation immédiate au Failback (appelé par notify_master.sh)
|
||||
if (in_array('--failback-check', $argv ?? [], true)) {
|
||||
$db = Database::getConnection();
|
||||
$cm = new ClusterManager($db);
|
||||
$res = $cm->failbackReconcileWithPeer();
|
||||
echo date('[Y-m-d H:i:s] ') . "[CLUSTER-FAILBACK] " . ($res['message'] ?? 'OK') . "\n";
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// 0. Verrou d'exécution exclusif pour éviter les chevauchements
|
||||
$lockFp = @fopen('/tmp/nexus_cluster_cron.lock', 'c+');
|
||||
if (!$lockFp || !@flock($lockFp, LOCK_EX | LOCK_NB)) {
|
||||
|
||||
Reference in new issue
Block a user