Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add support for specifying max slave count via SPORK_SLAVES_COUNT env…

…ironment variable using magazine run strategy.
  • Loading branch information...
commit a34a51968a99ac5a77acacafa595ec73cc136c78 1 parent a07c59d
Jarmo Pertman authored October 27, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  lib/spork/run_strategy/magazine.rb
2  lib/spork/run_strategy/magazine.rb
@@ -19,7 +19,7 @@
19 19
 
20 20
 class Spork::RunStrategy::Magazine < Spork::RunStrategy
21 21
 
22  
-  Slave_Id_Range = 1..2 # Ringserver uses id: 0. Slave use: 1..MAX_SLAVES
  22
+  Slave_Id_Range = 1..(ENV["SPORK_SLAVES_COUNT"] && ENV["SPORK_SLAVES_COUNT"].to_i || 2) # Ringserver uses id: 0. Slave use: 1..MAX_SLAVES
23 23
 
24 24
   def slave_max
25 25
     Slave_Id_Range.to_a.size

0 notes on commit a34a519

Please sign in to comment.
Something went wrong with that request. Please try again.