[GH-ISSUE #595] [FEATURE REQUEST] Query tasks from redis #2315

Open
opened 2026-03-15 20:03:40 +03:00 by kerem · 2 comments
Owner

Originally created by @endigma on GitHub (Dec 31, 2022).
Original GitHub issue: https://github.com/hibiken/asynq/issues/595

Originally assigned to: @hibiken on GitHub.

Is your feature request related to a problem? Please describe.
Our app has many tenants and sometimes tasks fail for one reason or another, it would be helpful to allow tenants to see jobs queued for them (emails, etc) and show the status.

Describe the solution you'd like
Method(s) to query tasks from the Redis server.

Describe alternatives you've considered
I looked at just re-implementing the query logic from the cli myself, but this seems like it should be in the main library.

Originally created by @endigma on GitHub (Dec 31, 2022). Original GitHub issue: https://github.com/hibiken/asynq/issues/595 Originally assigned to: @hibiken on GitHub. **Is your feature request related to a problem? Please describe.** Our app has many tenants and sometimes tasks fail for one reason or another, it would be helpful to allow tenants to see jobs queued for them (emails, etc) and show the status. **Describe the solution you'd like** Method(s) to query tasks from the Redis server. **Describe alternatives you've considered** I looked at just re-implementing the query logic from the cli myself, but this seems like it should be in the main library.
Author
Owner

@hibiken commented on GitHub (Jan 2, 2023):

There are a few ways to query tasks based on task's state:

CLI:

asynq task ls --state=RETRY --queue=myqueue

Programmatically

Asynqmon UI

  • Navigate to queue page and select task state

Let me know if you are thinking of some other solutions for your use case.

<!-- gh-comment-id:1369258881 --> @hibiken commented on GitHub (Jan 2, 2023): There are a few ways to query tasks based on task's state: ## CLI: `asynq task ls --state=RETRY --queue=myqueue` ## Programmatically - [`Inspector.ListRetryTasks`](https://pkg.go.dev/github.com/hibiken/asynq#Inspector.ListRetryTasks) - [`Inspector.ListArchivedTasks`](https://pkg.go.dev/github.com/hibiken/asynq#Inspector.ListArchivedTasks), etc ## Asynqmon UI - Navigate to queue page and select task state --- Let me know if you are thinking of some other solutions for your use case.
Author
Owner

@endigma commented on GitHub (Jan 3, 2023):

I see, where is documentation for Inspector? only in godoc?

<!-- gh-comment-id:1370209924 --> @endigma commented on GitHub (Jan 3, 2023): I see, where is documentation for `Inspector`? only in godoc?
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#2315
No description provided.