@workflow/world-postgres 5.0.5 → 5.1.0

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/dist/queue.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { type Queue, QueuePrefix } from '@workflow/world';
2
2
  import type { Pool } from 'pg';
3
- import type { PostgresWorldConfig } from './config.js';
3
+ import { type PostgresWorldConfig } from './config.js';
4
4
  /**
5
5
  * Serialize Graphile Worker log metadata. `JSON.stringify` alone renders an
6
6
  * `Error` as `{}` because `name`, `message`, `stack`, and `cause` are
@@ -17,8 +17,15 @@ export declare function serializeGraphileMeta(meta: unknown): string;
17
17
  * the workflow body inline, so response headers arrive only once that work is
18
18
  * done, and a bound here declares a slow-but-healthy delivery crashed and
19
19
  * redelivers it while the original is still running (two executions of the
20
- * same steps). Crash recovery is covered by Graphile releasing the job when
21
- * the worker dies, plus `reenqueueActiveRuns` on start.
20
+ * same steps). Crash recovery does not need one: `reenqueueActiveRuns`
21
+ * re-enqueues active runs on start, and with `jobLockStaleSeconds` set a
22
+ * running delivery renews its job lock and any other process releases a job
23
+ * whose lock goes unrenewed (because its process died), and the lock of its
24
+ * named queue, for redelivery (see `job-lease.ts`). Without it, Graphile
25
+ * Worker resets a dead worker's job and named-queue locks only after 4 hours
26
+ * (`resetLockedAt`). A spec 9 run's orchestrator deliveries all use the run's
27
+ * named queue, so without it a hard-killed worker can hold them back for that
28
+ * long; see the README.
22
29
  */
23
30
  export declare const DEFAULT_DELIVERY_HEADERS_TIMEOUT_MS = 0;
24
31
  export declare const DEFAULT_DELIVERY_BODY_TIMEOUT_MS = 0;
@@ -1 +1 @@
1
- {"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../src/queue.ts"],"names":[],"mappings":"AAgBA,OAAO,EAML,KAAK,KAAK,EAEV,WAAW,EAIZ,MAAM,iBAAiB,CAAC;AAczB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAG/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