[GH-ISSUE #872] [BUG] The related methods of Inspector basically lack the transmission of ctx #2456

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

Originally created by @shuqingzai on GitHub (Apr 28, 2024).
Original GitHub issue: https://github.com/hibiken/asynq/issues/872

Originally assigned to: @hibiken on GitHub.

Describe the bug

The Inspector method cannot pass ctx to control the execution of the broker. It should be allowed to enter the parameter ctx.

See: github.com/hibiken/asynq@2b632b93d5/inspector.go

Originally created by @shuqingzai on GitHub (Apr 28, 2024). Original GitHub issue: https://github.com/hibiken/asynq/issues/872 Originally assigned to: @hibiken on GitHub. **Describe the bug** The Inspector method cannot pass ctx to control the execution of the broker. It should be allowed to enter the parameter ctx. See: https://github.com/hibiken/asynq/blob/2b632b93d5d57a9302ad82a4b028830daa030c73/inspector.go - https://github.com/hibiken/asynq/blob/2b632b93d5d57a9302ad82a4b028830daa030c73/inspector.go#L42 - https://github.com/hibiken/asynq/blob/2b632b93d5d57a9302ad82a4b028830daa030c73/inspector.go#L225 - more...
Author
Owner

@cold-bin commented on GitHub (May 4, 2024):

I think asynq inspector don't need context in function. inspector is only called by asynqmon in order to inspect asynq now. why do you need ctx ?

<!-- gh-comment-id:2094102738 --> @cold-bin commented on GitHub (May 4, 2024): I think asynq inspector don't need context in function. inspector is only called by asynqmon in order to inspect asynq now. why do you need ctx ?
Author
Owner

@shuqingzai commented on GitHub (May 6, 2024):

I think asynq inspector don't need context in function. inspector is only called by asynqmon in order to inspect asynq now. why do you need ctx ?

@cold-bin

  1. This is a public API. It is not only used in asynqmon. You can use it anytime and anywhere.
  2. Add ctx for request timeout control, opentelemetry tracing and other functions have been expanded
<!-- gh-comment-id:2095923470 --> @shuqingzai commented on GitHub (May 6, 2024): > I think asynq inspector don't need context in function. inspector is only called by asynqmon in order to inspect asynq now. why do you need ctx ? @cold-bin 1. This is a public API. It is not only used in asynqmon. You can use it anytime and anywhere. 2. Add ctx for request timeout control, opentelemetry tracing and other functions have been expanded
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#2456
No description provided.