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
@@ -59,6 +59,22 @@ try {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($action === 'cluster_node_status') {
|
||||
$signature = $_SERVER['HTTP_X_NEXUS_CLUSTER_SIGNATURE'] ?? '';
|
||||
$cm = new ClusterManager($db);
|
||||
$res = $cm->getNodeStatusForPeer($rawBody ?: '', $signature);
|
||||
echo json_encode($res);
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($action === 'cluster_request_push') {
|
||||
$signature = $_SERVER['HTTP_X_NEXUS_CLUSTER_SIGNATURE'] ?? '';
|
||||
$cm = new ClusterManager($db);
|
||||
$res = $cm->handlePushRequestFromPeer($rawBody ?: '', $signature);
|
||||
echo json_encode($res);
|
||||
exit;
|
||||
}
|
||||
|
||||
Auth::startSession();
|
||||
|
||||
// Pour les requêtes en lecture seule fréquente (polling métriques / statut), libérer immédiatement le verrou de session
|
||||
@@ -1889,6 +1905,11 @@ try {
|
||||
$ami = AmiClient::fromDatabase($db);
|
||||
$reloadInfo = $ami->reloadPjsipAndDialplan();
|
||||
|
||||
// Actualisation de l'horodatage de modification en base pour la réconciliation cluster
|
||||
try {
|
||||
$db->exec("UPDATE cluster_settings SET updated_at = CURRENT_TIMESTAMP WHERE id = 1");
|
||||
} catch (\Throwable) {}
|
||||
|
||||
// Synchronisation automatique temps réel vers le nœud pair si Cluster actif et Master
|
||||
$clusterSyncMsg = null;
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user