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
1515test /tmp
1616test /version_tmp
1717tmp
18+ * ~
Original file line number Diff line number Diff line change @@ -39,6 +39,17 @@ def should_work_on_queue? queuename
3939 end
4040
4141 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+
4253 qs = rotated_queues
4354 qs . each do |queue |
4455 log! "Checking #{ queue } "
You can’t perform that action at this time.
0 commit comments