Permalink
Browse files

randomize the counter when using multiple output directories to move …

…evenly spread the load
  • Loading branch information...
1 parent a43ecdc commit 9a2bca7a4629e94f608edccddab91657f01a69bb Dhruv Bansal committed Sep 24, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/wukong-load/syncers/prepare_syncer/handler.rb
@@ -34,6 +34,7 @@ def initialize syncer, settings
self.syncer = syncer
self.settings = settings
self.counter = 0
+ self.counter = rand(settings[:output].size) if settings[:output] && settings[:output].size > 1
extend (settings[:dry_run] ? FileUtils::NoWrite : FileUtils)
extend OrderedHandler if settings[:ordered]
end

0 comments on commit 9a2bca7

Please sign in to comment.