Increase polling duration for worker readiness check from 5 seconds to 15 seconds, updating related comments for clarity.

This commit is contained in:
Alex Newman
2025-12-29 17:55:11 -05:00
parent 3ea180c1ef
commit 3b28b779c8
9 changed files with 304 additions and 389 deletions
+3 -3
View File
@@ -110,10 +110,10 @@ async function checkWorkerVersion(): Promise<void> {
/**
* Ensure worker service is running
* Polls until worker is ready (assumes worker-cli.js start was called by hooks.json)
* Polls until worker is ready (assumes worker-service.cjs start was called by hooks.json)
*/
export async function ensureWorkerRunning(): Promise<void> {
const maxRetries = 25; // 5 seconds total
const maxRetries = 75; // 15 seconds total
const pollInterval = 200;
for (let i = 0; i < maxRetries; i++) {
@@ -130,6 +130,6 @@ export async function ensureWorkerRunning(): Promise<void> {
throw new Error(getWorkerRestartInstructions({
port: getWorkerPort(),
customPrefix: 'Worker did not become ready within 5 seconds.'
customPrefix: 'Worker did not become ready within 15 seconds.'
}));
}