@@ -3,15 +3,21 @@ Resque-round-robin
3
3
4
4
A plugin for Resque that implements round-robin behavior for workers.
5
5
6
+ resque-dynamic-queues is a pre-requisite, as is Resque 1.19
7
+
6
8
The standard behavior for Resque workers is to pull a job off a queue,
7
9
and continue until the queue is empty. Once empty, the worker moves
8
10
on to the next queue (if available).
9
11
10
12
For 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
12
14
keep the jobs of one customer from starving out other customers.
13
15
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
+
15
21
16
22
## Installation
17
23
@@ -25,7 +31,11 @@ And then execute:
25
31
26
32
## Usage
27
33
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
+
29
39
30
40
## Contributing
31
41
0 commit comments