wr0ngway / sidekiq-dynamic-queues

A sidekiq plugin for specifying the queues a worker pulls from with wildcards, negations, or dynamic look up from redis
MIT License
17 stars 22 forks source link

Don't do a global alphabetical sort when strict ordering. Closes #4. #5

Open adstage-david opened 10 years ago

adstage-david commented 10 years ago

I don't know if this is the intended functionality, but I need it for a worker setup like:

high_worker: sidekiq -q high.star.
worker: sidekiq -q medium.star. -q low.star.
metrics_worker: sidekiq -q high_metrics -q medium_metrics -q low_metrics
mailer_worker: sidekiq -q high_mailer -q medium_mailer -q low_mailer

With the current settings, lows will always end up before mediums due to the alphabetical sort after wildcards applied.

wr0ngway commented 10 years ago

I originally ported this from https://github.com/wr0ngway/resque-dynamic-queues and used https://github.com/wr0ngway/resque-queue-priority to dynamically handle priorities, so it made sense to sort the queues because that was the base resque behavior.

I didn't port resque-queue-priority to sidekiq as I stopped using sidekiq before it was needed. Perhaps it would be useful to you.

I've since merged those two into https://github.com/wr0ngway/qmore for use with Qless as that is what I'm working with now.

Given that I don't work with sidekiq anymore, are you interested in being added as a contributor and/or taking over ownership of this project? That way you can take it wherever you wish

adstage-david commented 10 years ago

Sure thing - I think we'll be using this plugin at work for a while, don't have a problem helping contribute.

wr0ngway commented 10 years ago

Ok, added you as a collaborator. When doing a release, I typically, check in a new version.rb with a bumped version number (semantic versioning), then check in an updated changelog ( https://gist.github.com/wr0ngway/9504108 ), then run "rake release" Whats your rubygems id? I'll give you permissions there as well.

adstage-david commented 10 years ago

I'm "therabidbanana" on rubygems - either that username or therabidbanana at gmail. When working on my home computer I'm also usually "therabidbanana" on github.

djurre commented 8 years ago

@adstage-david I am also running into this problem now, any chance this can be included in a release?

adstage-david commented 8 years ago

@djurre - like @wr0ngway - I've stopped using this gem... I can't recall the exact reason, but I believe it was related to our upgrading to Sidekiq Pro? Maybe reliable fetch is incompatible with this gem? Whatever the case, my suspicion that we'd keep using this gem was mistaken, so I haven't really had the chance to maintain it. :)

Given I don't have a real app to test this in any more/deal with the fallout of a bad release, I've been hesitant to roll a new version and push it up to rubygems. Maybe @wr0ngway can get you access if you're interested in keeping it up?