hibiken / asynq

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

How do I unregister my mux handler #845

Open tocomp opened 3 months ago

tocomp commented 3 months ago

For example

mux := asynq.NewServeMux()
mux.Handle("sendemail", newHandler())

Modified code

mux := asynq.NewServeMux()
mux.Handle("sendsms", newHandler())

I have registered MUX Handler sendemail, but if the MUX Handler method is deleted, Not Found for Task sendemail will appear after starting next time

linhbkhn95 commented 3 months ago

Hi @tocomp, if the MUX Handler method is deleted, Not Found for Task sendemail will appear after starting next time Can you give me exactly your expectations for this use case? As I know, per task type should have a particular handler. So, for your case, I suggest you should clear old data via some solutions below: