mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 22:28:10 +09:00
checkpoint: File edit:
🚀 Generated with [Claude Code](https://claude.com/claude-code) 📊 V3 Development Progress Checkpoint Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
This commit is contained in:
1 parent
b8a309b5ec
commit
d84a8cb6fb
1 file changed
+4
-4
@@ -196,18 +196,18 @@ export class TopologyManager extends EventEmitter implements ITopologyManager {
|
||||
throw new Error('No nodes available for leader election');
|
||||
}
|
||||
|
||||
// For hierarchical topology, the queen is the leader
|
||||
// For hierarchical topology, the queen is the leader (O(1) lookup)
|
||||
if (this.config.type === 'hierarchical') {
|
||||
const queen = this.state.nodes.find(n => n.role === 'queen');
|
||||
const queen = this.queenNode;
|
||||
if (queen) {
|
||||
this.state.leader = queen.agentId;
|
||||
return queen.agentId;
|
||||
}
|
||||
}
|
||||
|
||||
// For centralized topology, the coordinator is the leader
|
||||
// For centralized topology, the coordinator is the leader (O(1) lookup)
|
||||
if (this.config.type === 'centralized') {
|
||||
const coordinator = this.state.nodes.find(n => n.role === 'coordinator');
|
||||
const coordinator = this.coordinatorNode;
|
||||
if (coordinator) {
|
||||
this.state.leader = coordinator.agentId;
|
||||
return coordinator.agentId;
|
||||
|
||||
Reference in new issue
Block a user