lib/tasks/switchman.rake in switchman-1.3.0 vs lib/tasks/switchman.rake in switchman-1.3.1
- old
+ new
@@ -40,10 +40,10 @@
if ENV['SHARD']
scope = shard_scope(scope, ENV['SHARD'])
end
- Shard.with_each_shard(scope, Shard.categories, :parallel => ENV['PARALLEL'].to_i) do
+ Shard.with_each_shard(scope, Shard.categories, :parallel => ENV['PARALLEL'].to_i, :max_procs => ENV['MAX_PARALLEL_PROCS']) do
shard = Shard.current
puts "#{shard.id}: #{shard.description}"
::ActiveRecord::Base.connection_pool.spec.config[:shard_name] = Shard.current.name
::ActiveRecord::Base.configurations[::Rails.env] = ::ActiveRecord::Base.connection_pool.spec.config.stringify_keys
shard.database_server.unshackle do