Skip to content

Commit 478311f

Browse files
stackptrclaude
andcommitted
fix(glyph): parallelize mcpjungle server registration
The mcpjungle-register oneshot service registered 9 servers sequentially, each polling up to 60s for availability. This blocked nixos-rebuild switch for up to 9 minutes in the worst case. Run each registration in a background subshell so all servers are polled concurrently, reducing worst-case wait to 60s. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d1294ea commit 478311f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎modules/nixos/llm/mcpjungle.nix‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,16 @@ in {
150150
fi
151151
'';
152152

153-
registrations = lib.concatStringsSep "\n" (lib.mapAttrsToList mkRegistration cfg.servers);
153+
mkBackgroundRegistration = name: server: ''
154+
(
155+
${mkRegistration name server}
156+
) &
157+
'';
158+
159+
registrations = lib.concatStringsSep "\n" (lib.mapAttrsToList mkBackgroundRegistration cfg.servers);
154160
in ''
155161
${registrations}
162+
wait
156163
'';
157164
};
158165

0 commit comments

Comments
 (0)