Permalink
Browse files

Add support for specifying max slave count via SPORK_SLAVES_COUNT env…

…ironment variable using magazine run strategy.
  • Loading branch information...
1 parent a07c59d commit a34a51968a99ac5a77acacafa595ec73cc136c78 @jarmo committed Oct 27, 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["SPORK_SLAVES_COUNT"] && ENV["SPORK_SLAVES_COUNT"].to_i || 2) # Ringserver uses id: 0. Slave use: 1..MAX_SLAVES
def slave_max
Slave_Id_Range.to_a.size

0 comments on commit a34a519

Please sign in to comment.