hibiken / asynq

Simple, reliable, and efficient distributed task queue in Go
MIT License
9k stars 659 forks source link

[BUG] The related methods of Inspector basically lack the transmission of ctx #872

Open shuqingzai opened 2 months ago

shuqingzai commented 2 months ago

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

cold-bin commented 2 months ago

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 ?

shuqingzai commented 1 month ago

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