@@ -3,15 +3,21 @@ Resque-round-robin
33
44A plugin for Resque that implements round-robin behavior for workers.
55
6+ resque-dynamic-queues is a pre-requisite, as is Resque 1.19
7+
68The standard behavior for Resque workers is to pull a job off a queue,
79and continue until the queue is empty. Once empty, the worker moves
810on to the next queue (if available).
911
1012For our situation, which is probably pretty rare in rails deployments,
11- we have multiple customers who submit jobs to resque, and we need to
13+ we have multiple clients who submit jobs to resque, and we need to
1214keep the jobs of one customer from starving out other customers.
1315
14- resque-dynamic-queues is a pre-requisite.
16+ As we dynamically generate queues per client, the workers also try to
17+ avoid working on the same queue at the same time. This isn't a hard
18+ guarantee since the code that checks and pulls the job is not atomic,
19+ but it's good enough for our needs.
20+
1521
1622## Installation
1723
@@ -25,7 +31,11 @@ And then execute:
2531
2632## Usage
2733
28- TODO: Write usage instructions here
34+ Nothing special. This gem monkey-patches things so this is automatic.
35+
36+ A potential TODO is to have the ability to disable the one-worker-per-queue
37+ policy on a dynamic basis.
38+
2939
3040## Contributing
3141
0 commit comments