@workglow/job-queue 0.0.125 → 0.0.126
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 +12 -2
- package/dist/browser.d.ts +7 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/{types.d.ts → bun.d.ts} +1 -1
- package/dist/bun.d.ts.map +1 -0
- package/dist/node.d.ts +7 -0
- package/dist/node.d.ts.map +1 -0
- package/package.json +18 -9
- package/dist/types.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -457,10 +457,15 @@ await storage.setupDatabase();
|
|
|
457
457
|
|
|
458
458
|
### SQLite Storage (Node.js/Bun)
|
|
459
459
|
|
|
460
|
+
`SqliteQueueStorage` takes an open **`Sqlite.Database`** instance (not a path string).
|
|
461
|
+
|
|
460
462
|
```typescript
|
|
461
463
|
import { SqliteQueueStorage } from "@workglow/storage";
|
|
464
|
+
import { Sqlite } from "@workglow/storage/sqlite";
|
|
462
465
|
|
|
463
|
-
|
|
466
|
+
await Sqlite.init();
|
|
467
|
+
const db = new Sqlite.Database("./jobs.db");
|
|
468
|
+
const storage = new SqliteQueueStorage<Input, Output>(db, "my-queue");
|
|
464
469
|
await storage.setupDatabase();
|
|
465
470
|
```
|
|
466
471
|
|
|
@@ -524,7 +529,12 @@ const limiter = new RateLimiter(rateLimiterStorage, "my-queue", {
|
|
|
524
529
|
### Composite Limiter
|
|
525
530
|
|
|
526
531
|
```typescript
|
|
527
|
-
import {
|
|
532
|
+
import {
|
|
533
|
+
CompositeLimiter,
|
|
534
|
+
ConcurrencyLimiter,
|
|
535
|
+
DelayLimiter,
|
|
536
|
+
RateLimiter,
|
|
537
|
+
} from "@workglow/job-queue";
|
|
528
538
|
import { InMemoryRateLimiterStorage } from "@workglow/storage";
|
|
529
539
|
|
|
530
540
|
// Create storage for the rate limiter
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bun.d.ts","sourceRoot":"","sources":["../src/bun.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,iBAAiB,CAAC"}
|
package/dist/node.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@workglow/job-queue",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.126",
|
|
6
6
|
"description": "Job queue management for Workglow, handling task scheduling, execution, and distributed processing.",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"watch": "concurrently -c 'auto' 'bun:watch-*'",
|
|
@@ -23,16 +23,25 @@
|
|
|
23
23
|
},
|
|
24
24
|
"exports": {
|
|
25
25
|
".": {
|
|
26
|
-
"react-native":
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
"react-native": {
|
|
27
|
+
"types": "./dist/browser.d.ts",
|
|
28
|
+
"import": "./dist/browser.js"
|
|
29
|
+
},
|
|
30
|
+
"browser": {
|
|
31
|
+
"types": "./dist/browser.d.ts",
|
|
32
|
+
"import": "./dist/browser.js"
|
|
33
|
+
},
|
|
34
|
+
"bun": {
|
|
35
|
+
"types": "./dist/bun.d.ts",
|
|
36
|
+
"import": "./dist/bun.js"
|
|
37
|
+
},
|
|
38
|
+
"types": "./dist/node.d.ts",
|
|
30
39
|
"import": "./dist/node.js"
|
|
31
40
|
}
|
|
32
41
|
},
|
|
33
42
|
"peerDependencies": {
|
|
34
|
-
"@workglow/storage": "0.0.
|
|
35
|
-
"@workglow/util": "0.0.
|
|
43
|
+
"@workglow/storage": "0.0.126",
|
|
44
|
+
"@workglow/util": "0.0.126"
|
|
36
45
|
},
|
|
37
46
|
"peerDependenciesMeta": {
|
|
38
47
|
"@workglow/storage": {
|
|
@@ -43,8 +52,8 @@
|
|
|
43
52
|
}
|
|
44
53
|
},
|
|
45
54
|
"devDependencies": {
|
|
46
|
-
"@workglow/storage": "0.0.
|
|
47
|
-
"@workglow/util": "0.0.
|
|
55
|
+
"@workglow/storage": "0.0.126",
|
|
56
|
+
"@workglow/util": "0.0.126"
|
|
48
57
|
},
|
|
49
58
|
"files": [
|
|
50
59
|
"dist"
|
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,iBAAiB,CAAC"}
|