Skip to content

armgit / hypit

Public Imported from GitHub
0

Clone any viral video with AI agents. Not just a script, the whole workflow: swap the face, the words, the B-roll, ship 100 variants in one command, and get your 100M views.

fix: the Worker fixture logs before it claims to be ready

rponef0aac5149b32
diff --git a/packages/runtime-local/test/worker-process.test.ts b/packages/runtime-local/test/worker-process.test.ts
index 1d269b70..1e936caa 100644
--- a/packages/runtime-local/test/worker-process.test.ts
+++ b/packages/runtime-local/test/worker-process.test.ts
@@ -24,8 +24,10 @@ test("one detached Runtime Worker can be started, observed and stopped", async (
const index = process.argv.indexOf("--ready-file");
const ready = process.argv[index + 1];
fs.mkdirSync(path.dirname(ready), { recursive: true });
- fs.writeFileSync(ready, String(process.pid));
+ // Say it in the log before claiming to be ready. The ready file is what the parent waits on,
+ // so anything written after it is a race the parent can win.
process.stdout.write("worker-ready\\n");
+ fs.writeFileSync(ready, String(process.pid));
process.on("SIGTERM", () => process.exit(0));
setInterval(() => {}, 1000);
`;