@zmdb/jobs 1.0.0-beta.1 → 1.0.0-beta.2
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 +10 -10
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5,20 +5,20 @@ Typed queues, workers, dead letters, scheduling, leases, and explicit provider p
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
yarn add @zmdb/jobs@1.0.0-beta.
|
|
8
|
+
yarn add @zmdb/jobs@1.0.0-beta.2
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
The package is ESM-only and requires Node.js 26 or later. It has no third-party runtime peer. `yarn add zmdb@1.0.0-beta.
|
|
11
|
+
The package is ESM-only and requires Node.js 26 or later. It has no third-party runtime peer. `yarn add @zmdb/core@1.0.0-beta.2` does not install it, and there is no `@zmdb/core/jobs` facade.
|
|
12
12
|
|
|
13
13
|
## Choose the capability and its storage
|
|
14
14
|
|
|
15
|
-
The default [SQLite HTTP application](https://ambasta.github.io/zmdb/docs/web-overview.html) starts with `yarn add zmdb@1.0.0-beta.
|
|
15
|
+
The default [SQLite HTTP application](https://ambasta.github.io/zmdb/docs/web-overview.html) starts with `yarn add @zmdb/core@1.0.0-beta.2`. Add jobs when the application needs background work:
|
|
16
16
|
|
|
17
17
|
| Choice | Install | Public imports |
|
|
18
18
|
| --------------------------------------- | ------------------------------------------------------------------------------ | ----------------------------------------- |
|
|
19
|
-
| Portable queues and scheduling | `yarn add @zmdb/jobs@1.0.0-beta.
|
|
20
|
-
| SQLite jobs, including the memory store | `yarn add @zmdb/jobs@1.0.0-beta.
|
|
21
|
-
| PostgreSQL jobs | `yarn add @zmdb/jobs@1.0.0-beta.
|
|
19
|
+
| Portable queues and scheduling | `yarn add @zmdb/jobs@1.0.0-beta.2` | `@zmdb/jobs`, `@zmdb/jobs/schedule` |
|
|
20
|
+
| SQLite jobs, including the memory store | `yarn add @zmdb/jobs@1.0.0-beta.2 @zmdb/jobs-sqlite@1.0.0-beta.2` | `@zmdb/jobs`, `@zmdb/jobs-sqlite` |
|
|
21
|
+
| PostgreSQL jobs | `yarn add @zmdb/jobs@1.0.0-beta.2 @zmdb/jobs-postgres@1.0.0-beta.2 pg@^8.23.0` | `@zmdb/jobs`, `@zmdb/jobs-postgres`, `pg` |
|
|
22
22
|
|
|
23
23
|
The portable install supplies behavior and provider ports. Queue and worker constructors require an explicit `store` and throw `TypeError` when it is missing; they never choose SQLite automatically.
|
|
24
24
|
Per-replica schedules can run without a database. A cluster schedule requires a supplied `LeaseStore` and is refused before startup when it is missing. These package boundaries let applications select
|
|
@@ -65,7 +65,7 @@ lifecycle.
|
|
|
65
65
|
Replace the empty arrays with the workers and schedulers owned by that application. The extension uses the same startup, rollback, reverse shutdown, and grace deadline as every other `@zmdb/app`
|
|
66
66
|
extension.
|
|
67
67
|
|
|
68
|
-
The default package has no `pg` peer. SQLite workers add `@zmdb/jobs-sqlite@1.0.0-beta.
|
|
68
|
+
The default package has no `pg` peer. SQLite workers add `@zmdb/jobs-sqlite@1.0.0-beta.2`, which owns both durable and memory storage. PostgreSQL workers add `@zmdb/jobs-postgres@1.0.0-beta.2` and
|
|
69
69
|
`pg@^8.23.0`; that adapter borrows a caller-owned pool or client and never closes the supplied resource; it releases only connections it acquires internally.
|
|
70
70
|
|
|
71
71
|
## Alpha migration
|
|
@@ -75,9 +75,9 @@ Update the selected dependency and import together:
|
|
|
75
75
|
| Removed or branch-only import | Current import | Required selection |
|
|
76
76
|
| ----------------------------- | ----------------------------------------------- | ---------------------------------------------- |
|
|
77
77
|
| `@zmdb/jobs/memory` | `createMemoryJobStore` from `@zmdb/jobs-sqlite` | Add `@zmdb/jobs-sqlite` alongside `@zmdb/jobs` |
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
78
|
+
| `@zmdb/core/jobs` | `@zmdb/jobs` | Add `@zmdb/jobs` explicitly |
|
|
79
|
+
| `@zmdb/core/jobs/schedule` | `@zmdb/jobs/schedule` | Add `@zmdb/jobs` explicitly |
|
|
80
|
+
| `@zmdb/core/jobs/memory` | `createMemoryJobStore` from `@zmdb/jobs-sqlite` | Add both jobs and the SQLite provider |
|
|
81
81
|
|
|
82
82
|
The memory constructor now belongs to the SQLite provider. Keep portable queues, workers and schedules imported from `@zmdb/jobs`; supply the chosen provider through its public ports. The retired
|
|
83
83
|
entries have no runtime forwarders. The [queues guide](https://ambasta.github.io/zmdb/docs/web-queues.html) covers provider migrations, transactions and bounded shutdown.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zmdb/jobs",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
4
|
"description": "Portable typed queues, workers, scheduling, leases, and application lifecycle integration.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cron",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"test": "vitest run"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@zmdb/app": "1.0.0-beta.
|
|
46
|
+
"@zmdb/app": "1.0.0-beta.2"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
49
|
"node": ">=26"
|