@stacksjs/queue 0.75.487 → 0.75.490
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/dist/index.d.ts +1 -1
- package/dist/worker-monitor.d.ts +10 -12
- package/package.json +12 -12
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type { DeadLetterReason, DeadLetterRecord, ListDeadLetterFilter } from '.
|
|
|
7
7
|
export type { PoisonConfig } from './poison';
|
|
8
8
|
export type { CircuitBreakerConfig } from './circuit-breaker';
|
|
9
9
|
export type { JobEnvelope, JobEnvelopeOptions, ParsedEnvelope } from './envelope';
|
|
10
|
-
export type { WorkerSnapshot } from './worker-monitor';
|
|
10
|
+
export type { WorkerMetrics, WorkerSnapshot } from './worker-monitor';
|
|
11
11
|
// =============================================================================
|
|
12
12
|
// Redis queue driver
|
|
13
13
|
// =============================================================================
|
package/dist/worker-monitor.d.ts
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
import type { TrackedWorker } from './events';
|
|
2
2
|
/** One upsert per worker heartbeat, never a read/modify/write shared counter. */
|
|
3
3
|
export declare function persistWorkerSnapshot(snapshot: WorkerSnapshot): Promise<void>;
|
|
4
|
-
export declare function pruneWorkerSnapshots(now?:
|
|
4
|
+
export declare function pruneWorkerSnapshots(now?: number): Promise<void>;
|
|
5
5
|
/** A stale or stopped worker never appears to be processing work. */
|
|
6
|
-
export declare function workerSnapshotState(snapshot: WorkerSnapshot, now?:
|
|
7
|
-
export declare function readWorkerSnapshots(now?:
|
|
8
|
-
export declare function aggregateWorkerMetrics(snapshots: WorkerSnapshot[]):
|
|
9
|
-
|
|
10
|
-
completed: ReturnType<WorkerSnapshot[].reduce>;
|
|
11
|
-
failed: ReturnType<WorkerSnapshot[].reduce>
|
|
12
|
-
};
|
|
13
|
-
throughputPerMinute: unknown;
|
|
14
|
-
averageDuration: boolean
|
|
15
|
-
};
|
|
16
|
-
export declare const WORKER_STALE_MS: unknown;
|
|
6
|
+
export declare function workerSnapshotState(snapshot: WorkerSnapshot, now?: number): WorkerSnapshot;
|
|
7
|
+
export declare function readWorkerSnapshots(now?: number): Promise<WorkerSnapshot[]>;
|
|
8
|
+
export declare function aggregateWorkerMetrics(snapshots: WorkerSnapshot[]): WorkerMetrics;
|
|
9
|
+
export declare const WORKER_STALE_MS: number;
|
|
17
10
|
export declare const WORKER_RETENTION_MS: number;
|
|
18
11
|
export declare interface WorkerSnapshot {
|
|
19
12
|
worker: TrackedWorker
|
|
@@ -26,3 +19,8 @@ export declare interface WorkerSnapshot {
|
|
|
26
19
|
averageDuration: number
|
|
27
20
|
}
|
|
28
21
|
}
|
|
22
|
+
export declare interface WorkerMetrics {
|
|
23
|
+
counts: { completed: number, failed: number }
|
|
24
|
+
throughputPerMinute: number
|
|
25
|
+
averageDuration: number
|
|
26
|
+
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/queue",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.490",
|
|
6
6
|
"description": "The Stacks Queue system powered by bun-queue.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -63,23 +63,23 @@
|
|
|
63
63
|
"prepublishOnly": "bun run build"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@stacksjs/action-runner": "0.75.
|
|
66
|
+
"@stacksjs/action-runner": "0.75.490",
|
|
67
67
|
"@stacksjs/bun-queue": "^0.1.8",
|
|
68
|
-
"@stacksjs/cache": "0.75.
|
|
69
|
-
"@stacksjs/config": "0.75.
|
|
70
|
-
"@stacksjs/cron": "0.75.
|
|
71
|
-
"@stacksjs/database": "0.75.
|
|
72
|
-
"@stacksjs/env": "0.75.
|
|
73
|
-
"@stacksjs/error-handling": "0.75.
|
|
74
|
-
"@stacksjs/logging": "0.75.
|
|
75
|
-
"@stacksjs/path": "0.75.
|
|
68
|
+
"@stacksjs/cache": "0.75.490",
|
|
69
|
+
"@stacksjs/config": "0.75.490",
|
|
70
|
+
"@stacksjs/cron": "0.75.490",
|
|
71
|
+
"@stacksjs/database": "0.75.490",
|
|
72
|
+
"@stacksjs/env": "0.75.490",
|
|
73
|
+
"@stacksjs/error-handling": "0.75.490",
|
|
74
|
+
"@stacksjs/logging": "0.75.490",
|
|
75
|
+
"@stacksjs/path": "0.75.490"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"better-dx": "^0.2.24"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
|
-
"@stacksjs/email": "0.75.
|
|
82
|
-
"@stacksjs/router": "0.75.
|
|
81
|
+
"@stacksjs/email": "0.75.490",
|
|
82
|
+
"@stacksjs/router": "0.75.490"
|
|
83
83
|
},
|
|
84
84
|
"peerDependenciesMeta": {
|
|
85
85
|
"@stacksjs/email": {
|