@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/README.md +24 -2
- package/dist/config.d.ts +29 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +11 -2
- package/dist/drizzle/schema.d.ts +177 -0
- package/dist/drizzle/schema.d.ts.map +1 -1
- package/dist/drizzle/schema.js +57 -2
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +58 -21
- package/dist/job-lease.d.ts +64 -0
- package/dist/job-lease.d.ts.map +1 -0
- package/dist/job-lease.js +317 -0
- package/dist/queue.d.ts +10 -3
- package/dist/queue.d.ts.map +1 -1
- package/dist/queue.js +106 -23
- package/dist/start-hook.d.ts +60 -0
- package/dist/start-hook.d.ts.map +1 -0
- package/dist/start-hook.js +220 -0
- package/dist/storage.d.ts +21 -1
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +320 -110
- package/package.json +7 -7
- package/src/drizzle/migrations/0028_add_start_hook_admissions.sql +42 -0
- package/src/drizzle/migrations/0029_add_run_job_prefix.sql +4 -0
- package/src/drizzle/migrations/meta/_journal.json +14 -0
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
|
|
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
|
|
21
|
-
*
|
|
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;
|
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,EAOL,KAAK,KAAK,EAEV,WAAW,EAKZ,MAAM,iBAAiB,CAAC;AAczB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAG/B,OAAO,EAAE,KAAK,mBAAmB,EAAoB,MAAM,aAAa,CAAC;AAMzE;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAsB3D;AAsBD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mCAAmC,IAAI,CAAC;AACrD,eAAO,MAAM,gCAAgC,IAAI,CAAC;AASlD;;;;;GAKG;AACH,wBAAgB,mBAAmB;;;EAWlC;AA+DD;;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,GACT,aAAa,CAmgCf"}
|