lib/qfill/pusher.rb in qfill-0.0.1 vs lib/qfill/pusher.rb in qfill-0.0.2
- old
+ new
@@ -46,10 +46,10 @@
ratio_to_split = (1 - with_ratio.inject(0, :+))
if ratio_to_split < 0
raise ArgumentError, "#{self.class}: mismatched ratios for queues #{with_ratio.join(' + ')} must not total more than 1"
end
num_without_ratio = self.queues.length - with_ratio.length
- if num_without_ratio > 0 && ratio_to_split < 1
+ if num_without_ratio > 0 && ratio_to_split <= 1
equal_portion = ratio_to_split / num_without_ratio
self.queues.each do |queue|
if queue.ratio.nil?
queue.tap do |q|
q.ratio = equal_portion