Skip to content

Commit

Permalink
Gather data in sync mode (redis crashes when getting the data from mu…
Browse files Browse the repository at this point in the history
…ltiple instances at the same time O_o)
  • Loading branch information
SlavaSkvortsov committed Nov 17, 2022
1 parent 58e5752 commit 227caa5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arq_admin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ async def _get_queue_stats(queue_name: str) -> QueueStats:

@classmethod
async def _gather_queues(cls) -> List[QueueStats]:
return list(await asyncio.gather(*[cls._get_queue_stats(name) for name in ARQ_QUEUES.keys()]))
result = [] # pragma: no cover
for name in ARQ_QUEUES.keys(): # pragma: no cover
result.append(await cls._get_queue_stats(name))
return result


@method_decorator(staff_member_required, name='dispatch')
Expand Down

0 comments on commit 227caa5

Please sign in to comment.