2
0
mirror of https://github.com/hibiken/asynq.git synced 2026-04-20 13:15:51 +08:00
Files
asynq/internal
Nil 2fd155e31d Fix nil guard for MEMORY USAGE in memoryUsageCmd Lua script
MEMORY USAGE returns nil for keys that no longer exist (e.g., expired
or deleted task keys). In Lua, nil is converted to false (a boolean).
The script then attempts arithmetic on this boolean value, causing:

  ERR user_script:30: attempt to perform arithmetic on local 'bytes'
  (a boolean value)

This breaks the /api/queues endpoint in asynqmon, showing "Could not
retrieve queues live data" in the UI.

The fix adds nil guards around all three MEMORY USAGE calls on task
keys, and a divide-by-zero guard on agg_task_sample_size.

Tested in production with Redis 7.2 and asynq v0.25.1 worker.

Fixes #728
Related to #901
2026-02-07 15:13:58 +08:00
..
2022-05-16 21:14:15 -07:00
2025-11-04 19:06:18 +03:00
2023-04-17 22:30:33 -07:00