Validating Queue Names #5924
Unanswered
stevenharman
asked this question in
Q&A
Replies: 1 comment 3 replies
-
|
Queue names are an application concern. Any validation belongs in your code. I don’t see this as likely to change but if you have a proposal, you’re welcome to pitch the idea. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Anyone else here every typo'd a queue name and then been left smashing your face into the keyboard for an hour until you realized the typo? Just me? 😄
Our Sidekiq setup has weighted queues which we enumerate in a single place, like this:
Our Sidekiq
config.ymlthen enumerates that Hash to build the list of queues to monitor. This works great b/c we can keep the weights and names in source control, right next to the jobs. And we don't screw up typing them into the YAML config.But this didn't stop me from typo-ing a queue name for a new job. I'd like to remedy that. I'm thinking of adding something to our base Job class, along these lines:
What do you think? Am I building a foot gun I'll come to regret? Is there a way to do this that's not dependent on a base job class (or mixin) - like some way to add this to Sidekiq proper?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions