Permalink
Browse files

make max slaves number in magzine mode configurable through MAX_SLAVE…

…S environment variable
  • Loading branch information...
1 parent becc3e4 commit dfd1aeedabca04dffe5c5936b06c48dd1ac1237d @wpc committed Apr 21, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/spork/run_strategy/magazine.rb
@@ -19,7 +19,7 @@
class Spork::RunStrategy::Magazine < Spork::RunStrategy
- Slave_Id_Range = 1..2 # Ringserver uses id: 0. Slave use: 1..MAX_SLAVES
+ Slave_Id_Range = 1..(ENV['MAX_SLAVES'] || 2).to_i # Ringserver uses id: 0. Slave use: 1..MAX_SLAVES
def slave_max
Slave_Id_Range.to_a.size

0 comments on commit dfd1aee

Please sign in to comment.