[GH-ISSUE #1008] [FEATURE REQUEST] Inspect Task position in Queue by LPOS #2509

Open
opened 2026-03-15 20:44:51 +03:00 by kerem · 0 comments
Owner

Originally created by @slhmy on GitHub (Jan 17, 2025).
Original GitHub issue: https://github.com/hibiken/asynq/issues/1008

Originally assigned to: @hibiken, @kamikazechaser on GitHub.

Is your feature request related to a problem? Please describe.
Some like: while running asynq task inspect, the position of the task in a queue can also be printed.

Describe the solution you'd like
According to the official document, LPOS is available since Redis 6.0.6 which can get the elements index from a list. In this case we may simply query in the pending list, then we can get the task's position.

Describe alternatives you've considered
Give an option in the config to control wether this feature should be enabled (disabled by default?), which can hold the cases when some user is using Redis in version lower than 6.0.6.

Originally created by @slhmy on GitHub (Jan 17, 2025). Original GitHub issue: https://github.com/hibiken/asynq/issues/1008 Originally assigned to: @hibiken, @kamikazechaser on GitHub. **Is your feature request related to a problem? Please describe.** Some like: while running asynq task inspect, the position of the task in a queue can also be printed. **Describe the solution you'd like** According to the official document, [LPOS](https://redis.io/docs/latest/commands/lpos/) is available since Redis 6.0.6 which can get the elements index from a list. In this case we may simply query in the pending list, then we can get the task's position. **Describe alternatives you've considered** Give an option in the config to control wether this feature should be enabled (disabled by default?), which can hold the cases when some user is using Redis in version lower than 6.0.6.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#2509
No description provided.