orchestrating 0.1.27 → 0.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/orch +6 -0
- package/package.json +1 -1
package/bin/orch
CHANGED
|
@@ -248,6 +248,7 @@ async function handleDaemon(projectsDir) {
|
|
|
248
248
|
process.stderr.write(`${DIM}${PREFIX} Tip: Use 'nohup orch daemon &' to run in background${RESET}\n`);
|
|
249
249
|
|
|
250
250
|
let reconnecting = false;
|
|
251
|
+
const recentRequests = new Set();
|
|
251
252
|
|
|
252
253
|
function scheduleReconnect(delaySec) {
|
|
253
254
|
if (reconnecting) return;
|
|
@@ -330,6 +331,11 @@ async function handleDaemon(projectsDir) {
|
|
|
330
331
|
|
|
331
332
|
if (msg.type === "start_session") {
|
|
332
333
|
const { requestId, command: cmd, args: cmdArgs, cwd, label: lbl, yolo } = msg;
|
|
334
|
+
// Dedup: ignore if we already handled this request
|
|
335
|
+
if (recentRequests.has(requestId)) return;
|
|
336
|
+
recentRequests.add(requestId);
|
|
337
|
+
setTimeout(() => recentRequests.delete(requestId), 30_000);
|
|
338
|
+
|
|
333
339
|
const cmdStr = [cmd, ...cmdArgs].join(" ");
|
|
334
340
|
process.stderr.write(`${GREEN}${PREFIX} Spawning: ${cmdStr}${RESET}\n`);
|
|
335
341
|
|