Skip to content

Commit

Permalink
Merge pull request #12 from GSA-OCSIT/master
Browse files Browse the repository at this point in the history
Modified default scheduler to choose initial slave at random, instead of first in list
  • Loading branch information
schoefmann committed Mar 29, 2012
2 parents 1eddb75 + d9ced6f commit 94cebea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/multi_db/scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def initialize(items, blacklist_timeout = 1.minute)
@items = items
@blacklist = Array.new(@n, Time.at(0))
@blacklist_timeout = blacklist_timeout
self.current_index = 0
self.current_index = rand(@n)
end

def blacklist!(item)
Expand Down

0 comments on commit 94cebea

Please sign in to comment.