GithubHelp home page GithubHelp logo

ndalmia / resque-queue-priority Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wr0ngway/resque-queue-priority

0.0 2.0 1.0 28 KB

A resque plugin for specifying the priority between queues that workers use to determine what to work on next

License: MIT License

Ruby 88.55% HTML 11.45%

resque-queue-priority's Introduction

A resque plugin for specifying the order a worker will prioritize queues in.

Authored against Resque 1.17.1, so it at least works with that - try running the tests if you use a different version of resque

Build Status

Usage:

Start your workers with a QUEUE that contains many queue names - this plugin is most useful when using '*' or a plugin like resque-dynamic-queues.

The queue priority web ui is shown as a tab in the resque-web UI, and allows you to define the queue priorities. To activate it, you need to require 'resque-queue-priority-server' in whatever initializer you use to bring up resque-web.

Then you should set use the web ui to determine the order a worker will pick a queue for processing. The "Fairly" checkbox makes all queues that match that pattern get ordered in a random fashion (i.e. provides the same functionality as resque-fairly).

For example, say my resque system has the queues:

low_foo, low_bar, low_baz, high_foo, high_bar, high_baz, otherqueue, somequeue, myqueue

And I run my worker with QUEUE=* (Note Resque wildcarding sorts queues)

If I set my patterns like:

high_* (fairly unchecked)
default (fairly unchecked)
low_* (fairly unchecked)

Then, the worker will scan the queues for work in this order: high_bar, high_baz, high_foo, myqueue, otherqueue, somequeue, low_bar, low_baz, low_foo

If I set my patterns like:

high_* (fairly checked)
default (fairly checked)
low_* (fairly checked)

Then, the worker will scan the queues for work in this order:

*[high_bar, high_baz, high_foo].shuffle, *[myqueue, otherqueue, somequeue].shuffle, *[low_bar, low_baz, low_foo].shuffle

Contributors:

Matt Conway ( https://github.com/wr0ngway )

resque-queue-priority's People

Contributors

wr0ngway avatar cmason avatar ndalmia avatar

Watchers

James Cloos avatar  avatar

Forkers

boballer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.