@weifuwujs/tasks 0.9.0 → 1.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 +3 -0
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -81,6 +81,9 @@ import { tasksStoreContract } from '@weifuwujs/tasks/testing'
|
|
|
81
81
|
tasksStoreContract('my-store', () => memoryTaskStore())
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
+
工厂**会被套件多次调用**:每次须返回独立的 store(sqlite 驱动用 `':memory:'` 或唯一路径)——
|
|
85
|
+
复用同一文件会状态泄漏并假红。
|
|
86
|
+
|
|
84
87
|
## 至少一次与幂等
|
|
85
88
|
|
|
86
89
|
- **attempts 在领取时 +1**:即使进程硬崩溃、`complete` 从未执行,本次尝试也被计数,不会无限重跑;
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weifuwujs/tasks",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "weifuwu 任务队列:至少一次 + 幂等键、指数退避/死信、memory/sqlite/postgres/redis 四驱动 + 契约套件",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=24.0.0"
|
|
8
|
+
},
|
|
6
9
|
"exports": {
|
|
7
10
|
".": {
|
|
8
11
|
"types": "./dist/index.d.ts",
|
|
@@ -40,7 +43,7 @@
|
|
|
40
43
|
"prepublishOnly": "npm run typecheck && npm run build && npm test"
|
|
41
44
|
},
|
|
42
45
|
"peerDependencies": {
|
|
43
|
-
"@weifuwujs/weifuwu": ">=
|
|
46
|
+
"@weifuwujs/weifuwu": ">=1 <2",
|
|
44
47
|
"postgres": ">=3.4.0",
|
|
45
48
|
"ioredis": ">=5.0.0"
|
|
46
49
|
},
|