Skip to content

[FEATURE REQUEST] Accept regex in mux.HanlderFunc() #1077

@turisap

Description

@turisap

Is your feature request related to a problem? Please describe.
We use aynq and we want to process tasks grouped by type via a single handler, for example:

  • we have a group of scheduled tasks which all have type of automatic tasks (naming is auto:some_name)
  • we have configuration in the task payload, which is used in the handler to decide which users it will be assigned to
  • we want to use a single handler for all tasks of type auto, but in the moment mux.HandlerFunc() does not seem to be accepting sth like auto:* as a pattern parameter

Describe the solution you'd like
we want to use `mux.HandlerFunc('auto:*', ...) to handle them all as there are quite a lot of those task and we have groups of tasks.

Describe alternatives you've considered
at the moment, I just assign handlers in a loop.

Additional context
In the case of this is not implemented, I am willing to submit a PR if possible

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions