@warlock.js/queue 5.25.0 → 5.27.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/CHANGELOG.md +12 -0
- package/llms-full.txt +16 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ All notable changes to `@warlock.js/queue` are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
|
|
6
6
|
|
|
7
|
+
## 5.27.0 - 2026-10-01
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Lockstep release; package APIs are unchanged.
|
|
12
|
+
|
|
13
|
+
## 5.26.0 - 2026-09-30
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Dependencies: `fastify` ^5.12.5 (security fixes). `@bull-board/*` ^9.10.2.
|
|
18
|
+
|
|
7
19
|
## 5.25.0 - 2026-09-28
|
|
8
20
|
|
|
9
21
|
### Changed
|
package/llms-full.txt
CHANGED
|
@@ -115,6 +115,22 @@ const job = await sendInvoice.find(id);
|
|
|
115
115
|
// { id, name, queue, state, payload, progress, attemptsMade, result, failedReason, createdAt, finishedAt }
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
+
## Carry request context into jobs
|
|
119
|
+
|
|
120
|
+
```ts
|
|
121
|
+
setQueueContext(
|
|
122
|
+
defineQueueContext({
|
|
123
|
+
capture: () => tenantStorage.getStore(), // runs inside dispatch()
|
|
124
|
+
restore: (tenant, run) => tenantStorage.run(tenant, run), // wraps handle()
|
|
125
|
+
}),
|
|
126
|
+
);
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
- `undefined` from `capture` carries nothing; the value must be JSON-safe. Read it in a handler as `ctx.context` (`unknown`).
|
|
130
|
+
- Jobs dispatched from a restored handler capture the same context.
|
|
131
|
+
- `defineJob({ context: false })` opts a job out.
|
|
132
|
+
- Throw `UnrecoverableJobError` from a handler or `restore` to fail the job without retries.
|
|
133
|
+
|
|
118
134
|
## Rules
|
|
119
135
|
|
|
120
136
|
- A job name with no handler in the worker process fails at once, without retries.
|
package/package.json
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"peerDependencies": {
|
|
12
12
|
"@bull-board/api": "^9.0.0",
|
|
13
13
|
"@bull-board/fastify": "^9.0.0",
|
|
14
|
-
"@warlock.js/core": "5.
|
|
15
|
-
"@warlock.js/logger": "5.
|
|
14
|
+
"@warlock.js/core": "5.27.0",
|
|
15
|
+
"@warlock.js/logger": "5.27.0"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"@bull-board/api": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
],
|
|
38
38
|
"author": "hassanzohdy",
|
|
39
39
|
"license": "MIT",
|
|
40
|
-
"version": "5.
|
|
40
|
+
"version": "5.27.0",
|
|
41
41
|
"main": "./cjs/index.cjs",
|
|
42
42
|
"module": "./esm/index.mjs",
|
|
43
43
|
"types": "./esm/index.d.mts",
|