改进 清理
This commit is contained in:
parent
eeddeab5e3
commit
90a0227b7c
@ -36,6 +36,12 @@ public function handle(): int
|
|||||||
if ($now - $node['last_heartbeat'] > 30) {
|
if ($now - $node['last_heartbeat'] > 30) {
|
||||||
$this->info("节点 {$node['id']} 已离线,将被清理。");
|
$this->info("节点 {$node['id']} 已离线,将被清理。");
|
||||||
ClusterSupport::removeNode($node['id']);
|
ClusterSupport::removeNode($node['id']);
|
||||||
|
|
||||||
|
if ($node['type'] == 'edge') {
|
||||||
|
// 移除前 5 个字符,即 "edge-"。
|
||||||
|
$id = substr($node['id'], 5);
|
||||||
|
ClusterSupport::removeNode($id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user