@fudrouter/fsrouter 0.6.108 → 0.6.109

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.
@@ -747,7 +747,7 @@ function executeCodeBuddySignup(accountId, jobId, idx, settings, jobStartTimes =
747
747
  catch (e) {
748
748
  console.error("Cloudflare auto-add to 9router failed:", e);
749
749
  }
750
- return resolve();
750
+ return resolve(undefined);
751
751
  }
752
752
  catch (err) {
753
753
  const errMsg = err.message || String(err);
@@ -758,7 +758,7 @@ function executeCodeBuddySignup(accountId, jobId, idx, settings, jobStartTimes =
758
758
  error: errMsg,
759
759
  ok: false
760
760
  });
761
- return resolve();
761
+ return resolve(undefined);
762
762
  }
763
763
  }
764
764
  // ── End CF GAK path. isCloudflare + short password → Python browser below ──
@@ -911,6 +911,19 @@ function executeCodeBuddySignup(accountId, jobId, idx, settings, jobStartTimes =
911
911
  if (global._codebuddyState.activeProcesses) {
912
912
  global._codebuddyState.activeProcesses.add(child);
913
913
  }
914
+ // Hard timeout: if the python child hangs (e.g. stuck on a captcha/await),
915
+ // kill it so the worker can mark this account failed and move on instead of
916
+ // blocking the whole job (which leaves the UI stuck on "running").
917
+ const HARD_TIMEOUT_MS = 8 * 60 * 1000;
918
+ const hardTimer = setTimeout(() => {
919
+ if (!done) {
920
+ console.error(`[automation] account ${account.email} exceeded ${HARD_TIMEOUT_MS}ms, killing child`);
921
+ try {
922
+ child.kill("SIGKILL");
923
+ }
924
+ catch { }
925
+ }
926
+ }, HARD_TIMEOUT_MS);
914
927
  let stderrAccumulator = "";
915
928
  child.stderr.on("data", (data) => {
916
929
  console.error(`[child stderr] ${data.toString()}`);
@@ -1044,6 +1057,7 @@ function executeCodeBuddySignup(accountId, jobId, idx, settings, jobStartTimes =
1044
1057
  }
1045
1058
  });
1046
1059
  child.on("close", async (code) => {
1060
+ clearTimeout(hardTimer);
1047
1061
  if (global._codebuddyState.activeProcesses) {
1048
1062
  global._codebuddyState.activeProcesses.delete(child);
1049
1063
  }
@@ -1062,7 +1076,7 @@ function executeCodeBuddySignup(accountId, jobId, idx, settings, jobStartTimes =
1062
1076
  ok: false
1063
1077
  });
1064
1078
  }
1065
- resolve();
1079
+ resolve(undefined);
1066
1080
  });
1067
1081
  child.on("error", async (err) => {
1068
1082
  if (global._codebuddyState.activeProcesses) {
@@ -1080,7 +1094,7 @@ function executeCodeBuddySignup(accountId, jobId, idx, settings, jobStartTimes =
1080
1094
  ok: false
1081
1095
  });
1082
1096
  }
1083
- resolve();
1097
+ resolve(undefined);
1084
1098
  });
1085
1099
  }
1086
1100
  catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fudrouter/fsrouter",
3
- "version": "0.6.108",
3
+ "version": "0.6.109",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "9Router v2 — Express Backend (API, SSE, DB, Auth, MITM)",