@tiens.nguyen/gonext-local-worker 1.0.41 → 1.0.42

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.
@@ -931,6 +931,12 @@ async function runLocalHealthJob(job) {
931
931
  totalTimeSeconds,
932
932
  }),
933
933
  });
934
+ if (doneRes.status === 404) {
935
+ console.warn(
936
+ `[gonext-worker] local_health ${jobId} disappeared before completion PATCH (404 Job not found). Skipping.`
937
+ );
938
+ return;
939
+ }
934
940
  await ensureWorkerOk(doneRes, `complete local_health jobId=${jobId}`);
935
941
  const onlineCount = ollamaSources.filter((s) => s.online).length;
936
942
  console.log(
@@ -938,6 +944,12 @@ async function runLocalHealthJob(job) {
938
944
  );
939
945
  } catch (e) {
940
946
  const message = e instanceof Error ? e.message : String(e);
947
+ if (/failed 404/i.test(message) || /job not found/i.test(message)) {
948
+ console.warn(
949
+ `[gonext-worker] local_health ${jobId} no longer exists (404). Skipping fail PATCH.`
950
+ );
951
+ return;
952
+ }
941
953
  const failRes = await workerFetch(`/api/worker/jobs/${jobId}`, {
942
954
  method: "PATCH",
943
955
  body: JSON.stringify({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiens.nguyen/gonext-local-worker",
3
- "version": "1.0.41",
3
+ "version": "1.0.42",
4
4
  "description": "Polls GoNext cloud API for async local LLM jobs and runs them against Ollama/OpenAI-compatible servers on this Mac",
5
5
  "type": "module",
6
6
  "license": "MIT",