Ruby gem for coordinating multiple redis queues
Add this line to your application's Gemfile:
gem 'coordinator'
And then execute:
$ bundle
Or install it yourself as:
$ gem install coordinator
@coordinator = Coordinator::Base.new([
Coordinator::Queue.new("high"),
Coordinator::Queue.new("medium"),
Coordinator::Queue.new("low")
])
@coordinator.add_task("high", 1)
@coordinator.add_task("medium", 2)
@coordinator.add_priority_task("high", 3)
@coordinator.length_all # returns 3
@coordinator.peek_all # returns [3, 2]
@coordinator.next_task(["high"]) # returns 3
@coordinator.next_task(["medium"]) # returns 2
- Fork it ( http://github.com//coordinator/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request