[GH-ISSUE #466] [FEATURE REQUEST] support getting state of task #213

Closed
opened 2026-03-02 05:19:40 +03:00 by kerem · 2 comments
Owner

Originally created by @jack-evans on GitHub (May 15, 2022).
Original GitHub issue: https://github.com/hibiken/asynq/issues/466

Originally assigned to: @hibiken on GitHub.

Is your feature request related to a problem? Please describe.

It may be possible that on API call I enqueue a task and return a 202, but I want to provide an API that would then allow to retrieve the state of task, I.e has it been completed, is it still in progress etc

Describe the solution you'd like

The client can get a task that has been enqueued and give the state of progress.

Describe alternatives you've considered

Normally in a queuing system once something is taken off you don't then put it back on, might be a little out of scope of this project 🤔

Additional context
Add any other context or screenshots about the feature request here.

Originally created by @jack-evans on GitHub (May 15, 2022). Original GitHub issue: https://github.com/hibiken/asynq/issues/466 Originally assigned to: @hibiken on GitHub. **Is your feature request related to a problem? Please describe.** It may be possible that on API call I enqueue a task and return a 202, but I want to provide an API that would then allow to retrieve the state of task, I.e has it been completed, is it still in progress etc **Describe the solution you'd like** The client can get a task that has been enqueued and give the state of progress. **Describe alternatives you've considered** Normally in a queuing system once something is taken off you don't then put it back on, might be a little out of scope of this project 🤔 **Additional context** Add any other context or screenshots about the feature request here.
kerem 2026-03-02 05:19:40 +03:00
Author
Owner

@hibiken commented on GitHub (May 15, 2022):

@jack-evans Thank you for creating an issue!

The package provide Inspector type which allows you to query various information from the queue, including TaskInfo.
Calling Inspector.GetTaskInfo and inspecting TaskInfo.State should give you the current state of the task in question :)

LMK if you have questions!

<!-- gh-comment-id:1126955872 --> @hibiken commented on GitHub (May 15, 2022): @jack-evans Thank you for creating an issue! The package provide [`Inspector`](https://pkg.go.dev/github.com/hibiken/asynq#Inspector) type which allows you to query various information from the queue, including `TaskInfo`. Calling `Inspector.GetTaskInfo` and inspecting `TaskInfo.State` should give you the current state of the task in question :) LMK if you have questions!
Author
Owner

@jack-evans commented on GitHub (May 15, 2022):

Ahh was reading the client api doc rather than the inspector 🤦 thanks!

<!-- gh-comment-id:1126968979 --> @jack-evans commented on GitHub (May 15, 2022): Ahh was reading the client api doc rather than the inspector 🤦 thanks!
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#213
No description provided.