@@ -45,7 +45,7 @@ const QUEUE_SORT_COLUMNS: Record<string, string> = {
4545 storage : 'partition' ,
4646 queued : 'queued_count' ,
4747 deferred : 'deferred_count' ,
48- ready : 'GREATEST(queued_count - deferred_count, 0) ' ,
48+ ready : 'ready_count ' ,
4949 active : 'active_count' ,
5050 failed : 'failed_count' ,
5151 total : 'total_count' ,
@@ -97,7 +97,7 @@ const QUEUE_COLUMNS = `
9797 deletion_seconds as "deleteAfterSeconds",
9898 deferred_count as "deferredCount",
9999 queued_count as "queuedCount",
100- GREATEST(queued_count - deferred_count, 0) as "readyCount",
100+ ready_count as "readyCount",
101101 active_count as "activeCount",
102102 failed_count as "failedCount",
103103 total_count as "totalCount",
@@ -781,7 +781,7 @@ export async function getQueueStats (
781781 SELECT
782782 COALESCE(SUM(deferred_count), 0)::int as "totalDeferred",
783783 COALESCE(SUM(queued_count), 0)::int as "totalQueued",
784- COALESCE(SUM(GREATEST(queued_count - deferred_count, 0) ), 0)::int as "totalReady",
784+ COALESCE(SUM(ready_count ), 0)::int as "totalReady",
785785 COALESCE(SUM(active_count), 0)::int as "totalActive",
786786 COALESCE(SUM(failed_count), 0)::int as "totalFailed",
787787 COALESCE(SUM(total_count), 0)::int as "totalJobs",
0 commit comments