Skip to content

Commit

Permalink
Role dispatchers have a 24 hour timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Louth committed Oct 12, 2021
1 parent 6fba46b commit e6c8447
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Echo.Process/Role.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,13 @@ public static ProcessName Current
public static IEnumerable<ProcessId> NodeIds(ProcessId leaf) =>
Nodes(leaf).Values.Map(node => ProcessId.Top[node.NodeName].Append(leaf.Skip(1)));

public static HashMap<ProcessName, ClusterNode> Nodes(ProcessId leaf, SystemName system = default(SystemName)) =>
ClusterNodes24(system).Filter(node => node.Role == leaf.Take(1).Name);
public static HashMap<ProcessName, ClusterNode> Nodes(ProcessId leaf, SystemName system = default(SystemName))
{
var nodes = ClusterNodes(system).Filter(node => node.Role == leaf.Take(1).Name);
return nodes.Count == 0
? ClusterNodes24(system).Filter(node => node.Role == leaf.Take(1).Name)
: nodes;
}

static readonly ProcessId nextRoot;
static readonly ProcessId prevRoot;
Expand Down

0 comments on commit e6c8447

Please sign in to comment.