diff --git a/client/app/pages/admin/Jobs.jsx b/client/app/pages/admin/Jobs.jsx index a7e005eb08..44dc6e3bf9 100644 --- a/client/app/pages/admin/Jobs.jsx +++ b/client/app/pages/admin/Jobs.jsx @@ -40,10 +40,9 @@ class Jobs extends React.Component { } processQueues = ({ queues, workers }) => { - const queueCounters = values(queues).map(({ name, started, queued }) => ({ - name, + const queueCounters = values(queues).map(({ started, ...rest }) => ({ started: started.length, - queued: queued.length, + ...rest, })); const overallCounters = queueCounters.reduce( diff --git a/redash/monitor.py b/redash/monitor.py index f0d8abfa1b..406390fbcf 100644 --- a/redash/monitor.py +++ b/redash/monitor.py @@ -155,7 +155,7 @@ def rq_queues(): q.name: { 'name': q.name, 'started': fetch_jobs(q, StartedJobRegistry(queue=q).get_job_ids()), - 'queued': fetch_jobs(q, q.job_ids) + 'queued': len(q.job_ids) } for q in Queue.all(connection=redis_connection)}