File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
lib/resque/plugins/round_robin Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -15,3 +15,4 @@ spec/reports
15
15
test /tmp
16
16
test /version_tmp
17
17
tmp
18
+ * ~
Original file line number Diff line number Diff line change @@ -39,6 +39,17 @@ def should_work_on_queue? queuename
39
39
end
40
40
41
41
def reserve_with_round_robin
42
+
43
+ # DJs hack: allow this resque process to watch a named queue
44
+ # (python), and if that queue has more than a certain number of
45
+ # items on it, then we do nothing. This is a big hack to get
46
+ # around the lack of round-robining in pyres.
47
+ if ENV [ "RESQUE_DEPENDENT_ON" ] . present?
48
+ if Resque . size ( ENV [ "RESQUE_DEPENDENT_ON" ] ) > ENV [ "RESQUE_DEPENDENT_MAX" ]
49
+ return nil
50
+ end
51
+ end
52
+
42
53
qs = rotated_queues
43
54
qs . each do |queue |
44
55
log! "Checking #{ queue } "
You can’t perform that action at this time.
0 commit comments