velocious 1.0.607 → 1.0.608

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/README.md CHANGED
@@ -2405,7 +2405,7 @@ concurrency and per-job connection scopes are unchanged.
2405
2405
 
2406
2406
  `maxConcurrentForkedJobs` (default: `4`) caps how many out-of-process `executionMode: "forked"` or `executionMode: "spawned"` jobs one worker may keep in flight. Forked jobs use `child_process.fork()` with an attached IPC channel. After the main process acknowledges their durable status report, forked and spawned one-shot runners exit without waiting for graceful Beacon/database teardown; the OS closes their process-owned resources. A missing or rejected status acknowledgement makes the runner exit as failed instead of reporting clean success. Spawned jobs use the legacy `background-jobs-runner` CLI process via `child_process.spawn()` and are only for callers that intentionally want that spawned behavior.
2407
2407
 
2408
- `jobTimeoutMs` (or `VELOCIOUS_BACKGROUND_JOBS_JOB_TIMEOUT_MS`, milliseconds; default: disabled) is a wall-clock backstop for `"forked"` and `"pooled"` jobs. A job still running after the timeout is terminated (`SIGTERM`, then `SIGKILL` after the reaping grace) and reported `failed`, so a genuinely-hung job can't pin a worker's capacity — and its whole-app boot and DB connections — indefinitely (notably a retired-release worker draining after a deploy). For a **pooled** job the whole child running it is killed, so its concurrent in-flight siblings on that child are also reported `failed` and requeued — a hung JS job can't be cancelled any other way — before a replacement child is spawned. It's a coarse safety net, not per-job tuning: it applies to every forked and pooled job, so set it well above the longest legitimate job. Omit it, or set `null`/`<= 0`, to disable. `"inline"` jobs are not covered — they share the worker's process and can't be killed without killing the worker. See [docs/background-jobs.md](docs/background-jobs.md#job-timeout-hung-runner-backstop).
2408
+ `jobTimeoutMs` (or `VELOCIOUS_BACKGROUND_JOBS_JOB_TIMEOUT_MS`, milliseconds; default: disabled) is a wall-clock backstop for `"forked"` and `"pooled"` jobs. A job still running after the timeout is terminated (`SIGTERM`, then `SIGKILL` after the reaping grace) and reported `failed`, so a genuinely-hung job can't pin a worker's capacity — and its whole-app boot and DB connections — indefinitely (notably a retired-release worker draining after a deploy). For a **pooled** job the whole child running it is killed, so its concurrent in-flight siblings on that child are also reported `failed` and requeued — a hung JS job can't be cancelled any other way — before a replacement child is spawned. Set `options.timeoutMs` to a positive integer no greater than `2_147_483_647` for a per-job wall-clock timeout that overrides the worker default; a non-positive finite value disables the backstop for that job. Invalid types, non-finite values, fractions, and larger values are rejected before persistence. Omit it to retain the worker-level fallback. `"inline"` jobs are not covered — they share the worker's process and can't be killed without killing the worker. See [docs/background-jobs.md](docs/background-jobs.md#job-timeout-hung-runner-backstop).
2409
2409
 
2410
2410
  ### Dispatch strategy
2411
2411
 
@@ -1124,6 +1124,7 @@ export default class LocalBackgroundJobsStore {
1124
1124
  scheduleKey: null,
1125
1125
  scheduledAtMs: this._numberOrNull(row.scheduled_at_ms),
1126
1126
  status: row.status ? String(row.status) : "queued",
1127
+ timeoutMs: null,
1127
1128
  workerId: row.worker_id === null || row.worker_id === undefined ? null : String(row.worker_id)
1128
1129
  }
1129
1130
  }
@@ -1354,7 +1354,8 @@ export default class BackgroundJobsMain {
1354
1354
  workerId: worker.workerId,
1355
1355
  handedOffAtMs: handoff.handedOffAtMs,
1356
1356
  options: {
1357
- executionMode: job.executionMode
1357
+ executionMode: job.executionMode,
1358
+ ...(job.timeoutMs === null ? {} : {timeoutMs: job.timeoutMs})
1358
1359
  }
1359
1360
  }
1360
1361
  })
@@ -40,6 +40,7 @@ import {
40
40
  * @property {number} maxRetries - Retry cap.
41
41
  * @property {string} queue - Queue name.
42
42
  * @property {number} scheduledAtMs - Eligibility timestamp.
43
+ * @property {number | null} timeoutMs - Per-job timeout override, or null when omitted.
43
44
  */
44
45
 
45
46
  const MIGRATIONS_TABLE = "velocious_internal_migrations"
@@ -65,6 +66,8 @@ const COUNTS_REVISION_KEY = "counts"
65
66
  export const BACKGROUND_JOB_COUNTS_CHANNEL = "velocious-background-job-counts"
66
67
  export const BACKGROUND_JOB_COUNT_BUCKETS = ["all", "queued", "handed_off", "completed", "failed", "orphaned"]
67
68
  const COUNTED_JOB_STATUSES = BACKGROUND_JOB_COUNT_BUCKETS.slice(1)
69
+ const MAX_JOB_TIMEOUT_MS = 2_147_483_647
70
+ const JOB_TIMEOUT_VALIDATION_MESSAGE = `background job timeoutMs must be a finite non-positive number or an integer between 1 and ${MAX_JOB_TIMEOUT_MS}`
68
71
  const ORPHANED_AFTER_MS = 2 * 60 * 60 * 1000
69
72
 
70
73
  /**
@@ -496,7 +499,8 @@ export default class BackgroundJobsStore extends BackgroundJobsAdapter {
496
499
  maxRetries: preparedJob.maxRetries,
497
500
  queue: preparedJob.queue,
498
501
  scheduledAtMs: options.scheduledAtMs === undefined ? null : preparedJob.scheduledAtMs,
499
- scheduling: options.scheduledAtMs === undefined ? "immediate" : "scheduled"
502
+ scheduling: options.scheduledAtMs === undefined ? "immediate" : "scheduled",
503
+ ...(preparedJob.timeoutMs === null ? {} : {timeoutMs: preparedJob.timeoutMs})
500
504
  })
501
505
 
502
506
  return createHash("sha256").update(serialized).digest("hex")
@@ -1324,10 +1328,35 @@ export default class BackgroundJobsStore extends BackgroundJobsAdapter {
1324
1328
  jobName,
1325
1329
  maxRetries: this._normalizeMaxRetries(options?.maxRetries),
1326
1330
  queue,
1327
- scheduledAtMs: this._normalizeScheduledAtMs(options?.scheduledAtMs, createdAtMs)
1331
+ scheduledAtMs: this._normalizeScheduledAtMs(options?.scheduledAtMs, createdAtMs),
1332
+ timeoutMs: this._normalizeJobTimeoutMs(options)
1328
1333
  }
1329
1334
  }
1330
1335
 
1336
+ /**
1337
+ * Normalizes a per-job timeout while preserving omitted (worker fallback)
1338
+ * separately from explicitly disabled.
1339
+ * @param {import("./types.js").BackgroundJobOptions | undefined} options - Job options.
1340
+ * @returns {number | null} - Positive timeout, zero for disabled, or null when omitted.
1341
+ */
1342
+ _normalizeJobTimeoutMs(options) {
1343
+ if (options?.timeoutMs === undefined) return null
1344
+
1345
+ const timeoutMs = options.timeoutMs
1346
+
1347
+ if (typeof timeoutMs !== "number" || !Number.isFinite(timeoutMs)) {
1348
+ throw VelociousError.safe(JOB_TIMEOUT_VALIDATION_MESSAGE)
1349
+ }
1350
+
1351
+ if (timeoutMs <= 0) return 0
1352
+
1353
+ if (!Number.isInteger(timeoutMs) || timeoutMs > MAX_JOB_TIMEOUT_MS) {
1354
+ throw VelociousError.safe(JOB_TIMEOUT_VALIDATION_MESSAGE)
1355
+ }
1356
+
1357
+ return timeoutMs
1358
+ }
1359
+
1331
1360
  /**
1332
1361
  * Inserts one prepared queued job, including its concurrency registration.
1333
1362
  * @param {import("../database/drivers/base.js").default} db - Database connection.
@@ -1363,6 +1392,7 @@ export default class BackgroundJobsStore extends BackgroundJobsAdapter {
1363
1392
  schedule_key: scheduleKey,
1364
1393
  concurrency_key: concurrency?.concurrencyKey || null,
1365
1394
  max_concurrency: concurrency?.maxConcurrency || null,
1395
+ timeout_ms: preparedJob.timeoutMs,
1366
1396
  handoff_id: null
1367
1397
  }
1368
1398
  })
@@ -1588,6 +1618,7 @@ export default class BackgroundJobsStore extends BackgroundJobsAdapter {
1588
1618
  table.text("last_error", {null: true})
1589
1619
  table.string("concurrency_key", {null: true, index: true})
1590
1620
  table.integer("max_concurrency", {null: true})
1621
+ table.bigint("timeout_ms", {null: true})
1591
1622
 
1592
1623
  await db.createTable(table)
1593
1624
  }
@@ -1680,6 +1711,35 @@ export default class BackgroundJobsStore extends BackgroundJobsAdapter {
1680
1711
 
1681
1712
  await this._ensureQueueColumn(db)
1682
1713
  await this._ensureScheduleKeyColumn(db)
1714
+ await this._ensureJobTimeoutColumn(db)
1715
+ }
1716
+
1717
+ /**
1718
+ * Idempotently adds the per-job wall-clock timeout to existing job tables.
1719
+ * @param {import("../database/drivers/base.js").default} db - Database connection.
1720
+ * @returns {Promise<void>} - Resolves when ensured.
1721
+ */
1722
+ async _ensureJobTimeoutColumn(db) {
1723
+ const lockName = `${MIGRATION_SCOPE}:timeout_ms_column`
1724
+ const acquired = await db.acquireAdvisoryLock(lockName)
1725
+
1726
+ if (!acquired) throw new Error("Failed to acquire background jobs timeout schema lock")
1727
+
1728
+ try {
1729
+ db.clearSchemaCache()
1730
+ const table = await db.getTableByNameOrFail(JOBS_TABLE)
1731
+
1732
+ if (!(await table.getColumnByName("timeout_ms"))) {
1733
+ const tableData = new TableData(JOBS_TABLE)
1734
+ tableData.bigint("timeout_ms", {null: true})
1735
+
1736
+ for (const sql of await db.alterTableSQLs(tableData)) await db.query(sql)
1737
+
1738
+ db.clearSchemaCache()
1739
+ }
1740
+ } finally {
1741
+ await db.releaseAdvisoryLock(lockName)
1742
+ }
1683
1743
  }
1684
1744
 
1685
1745
  /**
@@ -2081,7 +2141,8 @@ export default class BackgroundJobsStore extends BackgroundJobsAdapter {
2081
2141
  workerId: row.worker_id ? String(row.worker_id) : null,
2082
2142
  lastError: row.last_error ? String(row.last_error) : null,
2083
2143
  concurrencyKey: row.concurrency_key ? String(row.concurrency_key) : null,
2084
- maxConcurrency: this._normalizeNumber(row.max_concurrency)
2144
+ maxConcurrency: this._normalizeNumber(row.max_concurrency),
2145
+ timeoutMs: this._normalizeNumber(row.timeout_ms)
2085
2146
  }
2086
2147
  }
2087
2148
 
@@ -53,6 +53,7 @@
53
53
  * @property {boolean} [deduplicateWhileQueued] - When true, skip the enqueue if an identical still-queued job (same job name, args and queue) is scheduled no later than this enqueue, returning the earliest matching job's id. A future retry does not suppress earlier work. Deduplication is independent of `concurrencyKey`, so the job keeps its normal (e.g. queue-derived) concurrency cap. Keeps an interval-scheduled recurring job (e.g. retention pruning) from piling up redundant queued rows when it runs slower than its interval or no worker is free.
54
54
  * @property {string} [idempotencyKey] - Durable enqueue identity scoped to the resolved job class name and queue. Exact replay returns the original job id across every state and after job pruning; reuse with different canonical arguments or behavior-affecting options fails. Ownership is independent of `deduplicateWhileQueued` and is retained until an explicit future retention policy removes it.
55
55
  * @property {number} [scheduledAtMs] - Epoch timestamp in milliseconds when the job becomes eligible for dispatch. Defaults to enqueue time.
56
+ * @property {number} [timeoutMs] - Per-job wall-clock timeout for forked and pooled execution. A positive integer up to 2,147,483,647 overrides the worker-level `jobTimeoutMs`; a non-positive finite value disables the timeout for this job.
56
57
  */
57
58
  /**
58
59
  * @typedef {object} BackgroundJobPayload
@@ -86,6 +87,7 @@
86
87
  * @property {string | null} lastError - Last failure message.
87
88
  * @property {string | null} concurrencyKey - Durable concurrency key.
88
89
  * @property {number | null} maxConcurrency - Durable per-key cap.
90
+ * @property {number | null} timeoutMs - Per-job wall-clock timeout override, or null when omitted.
89
91
  */
90
92
  /**
91
93
  * @typedef {"queued" | "handed_off" | null} BackgroundJobReplacementPreviousStatus
@@ -690,7 +690,7 @@ export default class BackgroundJobsWorker {
690
690
  state.lastDispatchSeq = ++this._pooledDispatchSeq
691
691
 
692
692
  return new Promise((resolve) => {
693
- const timeoutTimer = this._armPooledJobTimeout({child, jobId: payload.id})
693
+ const timeoutTimer = this._armPooledJobTimeout({child, payload})
694
694
 
695
695
  state.inflight.set(payload.id, {payload, resolve, timeoutTimer})
696
696
  try {
@@ -753,15 +753,15 @@ export default class BackgroundJobsWorker {
753
753
  * the timer, or null when no timeout is configured.
754
754
  * @param {object} args - Options.
755
755
  * @param {import("node:child_process").ChildProcess} args.child - Pooled child.
756
- * @param {string} args.jobId - Job id whose overrun is guarded.
756
+ * @param {import("./types.js").BackgroundJobPayload & {id: string}} args.payload - Job payload whose overrun is guarded.
757
757
  * @returns {ReturnType<typeof setTimeout> | null} - The armed timer, or null.
758
758
  */
759
- _armPooledJobTimeout({child, jobId}) {
760
- const timeoutMs = this._resolveJobTimeoutMs()
759
+ _armPooledJobTimeout({child, payload}) {
760
+ const timeoutMs = this._resolveJobTimeoutMs(payload.options)
761
761
 
762
762
  if (!(typeof timeoutMs === "number" && timeoutMs > 0)) return null
763
763
 
764
- return setTimeout(() => this._onPooledJobTimeout({child, jobId}), timeoutMs)
764
+ return setTimeout(() => this._onPooledJobTimeout({child, jobId: payload.id}), timeoutMs)
765
765
  }
766
766
 
767
767
  /**
@@ -1016,7 +1016,7 @@ export default class BackgroundJobsWorker {
1016
1016
  * @returns {Promise<void>} - Resolves when the child exits.
1017
1017
  */
1018
1018
  _waitForForkedChild({child, payload}) {
1019
- const timeoutState = this._armForkedJobTimeout({child})
1019
+ const timeoutState = this._armForkedJobTimeout({child, payload})
1020
1020
 
1021
1021
  return new Promise((resolve) => {
1022
1022
  child.once("exit", (code, signal) => {
@@ -1040,10 +1040,11 @@ export default class BackgroundJobsWorker {
1040
1040
  * and behavior is unchanged.
1041
1041
  * @param {object} args - Options.
1042
1042
  * @param {import("node:child_process").ChildProcess} args.child - Forked child process.
1043
+ * @param {import("./types.js").BackgroundJobPayload & {id: string}} args.payload - Job payload.
1043
1044
  * @returns {ForkedJobTimeoutState} - Timeout state.
1044
1045
  */
1045
- _armForkedJobTimeout({child}) {
1046
- const timeoutMs = this._resolveJobTimeoutMs()
1046
+ _armForkedJobTimeout({child, payload}) {
1047
+ const timeoutMs = this._resolveJobTimeoutMs(payload.options)
1047
1048
  /** @type {ForkedJobTimeoutState} */
1048
1049
  const state = {timedOut: false, timeoutMs, timer: null, sigkillTimer: null}
1049
1050
 
@@ -1056,14 +1057,18 @@ export default class BackgroundJobsWorker {
1056
1057
 
1057
1058
  /**
1058
1059
  * Resolves the effective wall-clock job timeout in ms (shared by forked and pooled jobs), or null when disabled. The
1059
- * constructor override wins; otherwise the value comes from the background-jobs
1060
- * configuration. A non-positive value disables the backstop.
1060
+ * per-job override wins, followed by the constructor override, then the value
1061
+ * from the background-jobs configuration. A non-positive value disables the
1062
+ * backstop at whichever level supplied it.
1063
+ * @param {import("./types.js").BackgroundJobOptions} [jobOptions] - Per-job options.
1061
1064
  * @returns {number | null} - Timeout in ms, or null when disabled.
1062
1065
  */
1063
- _resolveJobTimeoutMs() {
1064
- const raw = typeof this.jobTimeoutMsOverride === "number"
1065
- ? this.jobTimeoutMsOverride
1066
- : (this.configuration ? this.configuration.getBackgroundJobsConfig().jobTimeoutMs : null)
1066
+ _resolveJobTimeoutMs(jobOptions) {
1067
+ const raw = typeof jobOptions?.timeoutMs === "number"
1068
+ ? jobOptions.timeoutMs
1069
+ : (typeof this.jobTimeoutMsOverride === "number"
1070
+ ? this.jobTimeoutMsOverride
1071
+ : (this.configuration ? this.configuration.getBackgroundJobsConfig().jobTimeoutMs : null))
1067
1072
 
1068
1073
  // A non-finite (e.g. Infinity) or non-positive value disables the backstop;
1069
1074
  // a finite value beyond Node's timer range is clamped to the max rather than
@@ -1 +1 @@
1
- {"version":3,"file":"local-store.d.ts","sourceRoot":"","sources":["../../../src/background-jobs/local-store.js"],"names":[],"mappings":"AAIA,OAAO,SAAS,MAAM,iCAAiC,CAAA;AAgBvD,eAAO,MAAM,2BAA2B,oCAAoC,CAAA;AAC5E,eAAO,MAAM,sCAAsC,+CAA+C,CAAA;AAKlG,eAAO,MAAM,iCAAiC,UAK7C,CAAA;AA0BD;;;GAGG;AACH,wBAAgB,wBAAwB,IAF3B,OAAO,YAAY,EAAE,wBAAwB,CAQzD;AAED,wEAAwE;AACxE,MAAM,CAAC,OAAO,OAAO,wBAAwB;IAUpC,KAAK;IACL,aAAa;IACb,kBAAkB;IAClB,kBAAkB,SANR,IAAI;IAOd,QAAQ;IACb,mCAAmC;IAC9B,aAAa,EADP,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAE/B,0HAA0H;IACrH,yBAAyB,EADnB,OAAO,CAAC,OAAO,6BAA6B,EAAE,OAAO,EAAE;QAAC,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;KAAC,CAAC;IAhBxH;;;;;;;OAOG;IACH,YAAY,EAAC,aAAa,EAAE,KAAkC,EAAE,kBAAkB,EAAE,kBAAkB,EAAC,EALpG;QAAoD,aAAa,EAAzD,OAAO,qBAAqB,EAAE,OAAO,CAC7C;QAA6D,KAAK,AAAlE,CACA,EADQ,OAAO,YAAY,EAAE,wBAAwB,CACrD;QAAsB,kBAAkB,AAAxC,CACA,EADQ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