feat(queue): add typed application queue lifecycle
Quality / quality (ubuntu-latest) (push) Failing after 10m55s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
Clintchiz committed 2026-08-23 09:22:05 +05:30
1 parent 9332522614
commit 9377a69d88
17 files changed
+667 -13

No files matched your search

+2 -1
View File
@@ -85,10 +85,11 @@ export interface QueueDashboardSnapshot {
export async function queueDashboardSnapshot(queue: DurableQueue): Promise<QueueDashboardSnapshot> {
const jobs = await queue.list();
const history = await queue.history();
return {
generatedAt: Date.now(),
pending: jobs.length,
failed: queue.failed().length,
failed: history.filter((record) => record.state === "failed").length || queue.failed().length,
byName: jobs.reduce<Record<string, number>>((counts, job) => {
counts[job.name] = (counts[job.name] ?? 0) + 1;
return counts;