Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I unregister my mux handler #845

Open
tocomp opened this issue Mar 18, 2024 · 1 comment
Open

How do I unregister my mux handler #845

tocomp opened this issue Mar 18, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@tocomp
Copy link

tocomp commented Mar 18, 2024

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

@tocomp tocomp added the bug Something isn't working label Mar 18, 2024
@kamikazechaser kamikazechaser added question Further information is requested and removed bug Something isn't working labels Mar 18, 2024
@linhbkhn95
Copy link
Contributor

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:

  • Set Empty logic handler for sendemail type. Always return error = nil.
  • Clear data from [asynmon](https://github.com/hibiken/asynqmon)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants