@open-mercato/queue 0.6.3-develop.3810.1.ad92c339f5 → 0.6.3-develop.3820.1.636677865b
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/AGENTS.md +21 -3
- package/package.json +2 -2
package/AGENTS.md
CHANGED
|
@@ -9,12 +9,30 @@ Use `@open-mercato/queue` for all background job processing. MUST NOT implement
|
|
|
9
9
|
| Local | Use for development — jobs process from `.mercato/queue/` (or `QUEUE_BASE_DIR`) | `QUEUE_STRATEGY=local` |
|
|
10
10
|
| BullMQ | Use for production — Redis-backed with retries and concurrency | `QUEUE_STRATEGY=async` |
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Always
|
|
13
13
|
|
|
14
14
|
1. **MUST make workers idempotent** — jobs may be retried on failure; duplicate execution MUST NOT corrupt data
|
|
15
15
|
2. **MUST export `metadata`** with `{ queue, id?, concurrency? }` from every worker file
|
|
16
|
-
3. **MUST
|
|
17
|
-
|
|
16
|
+
3. **MUST test with both strategies** — verify workers process correctly with `local` and `async`
|
|
17
|
+
|
|
18
|
+
## Ask First
|
|
19
|
+
|
|
20
|
+
- Ask before changing queue strategy defaults, retry semantics, or worker concurrency limits.
|
|
21
|
+
- Ask before adding a polling loop or long-running process outside the queue worker contract.
|
|
22
|
+
|
|
23
|
+
## Never
|
|
24
|
+
|
|
25
|
+
- Never implement custom job queues or polling loops.
|
|
26
|
+
- Never exceed worker concurrency 20.
|
|
27
|
+
- Never make a worker depend on single-run semantics.
|
|
28
|
+
|
|
29
|
+
## Validation Commands
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
yarn generate
|
|
33
|
+
yarn workspace @open-mercato/queue test
|
|
34
|
+
yarn workspace @open-mercato/queue build
|
|
35
|
+
```
|
|
18
36
|
|
|
19
37
|
## Concurrency Guidelines
|
|
20
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/queue",
|
|
3
|
-
"version": "0.6.3-develop.
|
|
3
|
+
"version": "0.6.3-develop.3820.1.636677865b",
|
|
4
4
|
"description": "Multi-strategy job queue with local and BullMQ support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@open-mercato/shared": "0.6.3-develop.
|
|
53
|
+
"@open-mercato/shared": "0.6.3-develop.3820.1.636677865b"
|
|
54
54
|
},
|
|
55
55
|
"repository": {
|
|
56
56
|
"type": "git",
|