@workflow/world-postgres 5.1.1 → 5.2.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/README.md +18 -8
- package/dist/config.d.ts +14 -10
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -1
- package/dist/drizzle/schema.d.ts +50 -0
- package/dist/drizzle/schema.d.ts.map +1 -1
- package/dist/drizzle/schema.js +12 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -4
- package/dist/job-lease.d.ts +69 -17
- package/dist/job-lease.d.ts.map +1 -1
- package/dist/job-lease.js +221 -28
- package/dist/message.d.ts +1 -1
- package/dist/message.d.ts.map +1 -1
- package/dist/message.js +3 -3
- package/dist/queue.d.ts +22 -9
- package/dist/queue.d.ts.map +1 -1
- package/dist/queue.js +356 -55
- package/dist/retention.d.ts +1 -1
- package/dist/retention.js +2 -2
- package/dist/run-events.d.ts +35 -0
- package/dist/run-events.d.ts.map +1 -0
- package/dist/run-events.js +264 -0
- package/dist/run-status.d.ts +3 -4
- package/dist/run-status.d.ts.map +1 -1
- package/dist/run-status.js +4 -9
- package/dist/storage.d.ts +6 -0
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +98 -59
- package/dist/streamer.d.ts +6 -0
- package/dist/streamer.d.ts.map +1 -1
- package/dist/streamer.js +9 -3
- package/dist/zod.d.ts +1 -1
- package/dist/zod.d.ts.map +1 -1
- package/dist/zod.js +3 -3
- package/package.json +20 -20
- package/src/drizzle/migrations/0030_add_job_lock_holders.sql +9 -0
- package/src/drizzle/migrations/meta/_journal.json +7 -0
package/dist/queue.d.ts
CHANGED
|
@@ -18,14 +18,15 @@ export declare function serializeGraphileMeta(meta: unknown): string;
|
|
|
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
20
|
* same steps). Crash recovery does not need one: `reenqueueActiveRuns`
|
|
21
|
-
* re-enqueues active runs on start, and
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
21
|
+
* re-enqueues active runs on start, and a running delivery renews its job
|
|
22
|
+
* lock while any other process releases a job whose lock goes unrenewed
|
|
23
|
+
* (because its process died), and the lock of its named queue, for
|
|
24
|
+
* redelivery (see `job-lease.ts`). By default that release covers only the
|
|
25
|
+
* per-run named queues (a spec 9 run's orchestrator deliveries, invoke mode's
|
|
26
|
+
* executor lane) of renewing holders, after 300 seconds; with
|
|
27
|
+
* `jobLockStaleSeconds` set it covers every job of this World after that
|
|
28
|
+
* window, and `0` turns it off, leaving Graphile Worker's 4 hour reset
|
|
29
|
+
* (`resetLockedAt`).
|
|
29
30
|
*/
|
|
30
31
|
export declare const DEFAULT_DELIVERY_HEADERS_TIMEOUT_MS = 0;
|
|
31
32
|
export declare const DEFAULT_DELIVERY_BODY_TIMEOUT_MS = 0;
|
|
@@ -39,6 +40,13 @@ export declare function getDeliveryTimeouts(): {
|
|
|
39
40
|
headersTimeoutMs: number;
|
|
40
41
|
bodyTimeoutMs: number;
|
|
41
42
|
};
|
|
43
|
+
/**
|
|
44
|
+
* Re-runs of one spec 9 orchestrator delivery for the run's orchestrator
|
|
45
|
+
* messages that queued behind it (see `takeCoalescedJobs`), as world-vercel
|
|
46
|
+
* bounds its coalesced re-runs. Past the cap the delivery acknowledges, and
|
|
47
|
+
* the messages still waiting are delivered as usual.
|
|
48
|
+
*/
|
|
49
|
+
export declare const MAX_COALESCED_RERUNS = 32;
|
|
42
50
|
/**
|
|
43
51
|
* Process workflow and step jobs, with optional run-scoped execution queues for invoke().
|
|
44
52
|
*/
|
|
@@ -50,5 +58,10 @@ export type PostgresQueue = Queue & {
|
|
|
50
58
|
/** Deliver a queue prefix's messages over HTTP to `path` on the app (see `Queue.registerRoute`). */
|
|
51
59
|
registerRoute(prefix: QueuePrefix, path: string): void;
|
|
52
60
|
};
|
|
53
|
-
export declare function createQueue(config: PostgresWorldConfig, pool: Pool
|
|
61
|
+
export declare function createQueue(config: PostgresWorldConfig, pool: Pool,
|
|
62
|
+
/** @internal Test hooks; not part of the public API. */
|
|
63
|
+
internal?: {
|
|
64
|
+
/** The `'named-queues'` default window, in place of 300 seconds. */
|
|
65
|
+
defaultJobLockStaleSeconds?: number;
|
|
66
|
+
}): PostgresQueue;
|
|
54
67
|
//# sourceMappingURL=queue.d.ts.map
|
package/dist/queue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../src/queue.ts"],"names":[],"mappings":"AAgBA,OAAO,
|
|
1
|
+
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../src/queue.ts"],"names":[],"mappings":"AAgBA,OAAO,EASL,KAAK,KAAK,EAEV,WAAW,EAMZ,MAAM,iBAAiB,CAAC;AAczB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAG/B,OAAO,EAAE,KAAK,mBAAmB,EAAoB,MAAM,aAAa,CAAC;AAUzE;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAsB3D;AAsBD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,mCAAmC,IAAI,CAAC;AACrD,eAAO,MAAM,gCAAgC,IAAI,CAAC;AASlD;;;;;GAKG;AACH,wBAAgB,mBAAmB;;;EAWlC;AAgBD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAsFvC;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG;IAClC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,oGAAoG;IACpG,eAAe,CACb,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,GAC3C,IAAI,CAAC;IACR,oGAAoG;IACpG,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACxD,CAAC;AAEF,wBAAgB,WAAW,CACzB,MAAM,EAAE,mBAAmB,EAC3B,IAAI,EAAE,IAAI;AACV,wDAAwD;AACxD,QAAQ,CAAC,EAAE;IACT,oEAAoE;IACpE,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACrC,GACA,aAAa,CAwzCf"}
|