Sha256: 39b4a7f2939dfb5167176bb56d810304cdf818cf89f20c748d92ac8d290a47b4

Contents?: true

Size: 654 Bytes

Versions: 4

Compression:

Stored size: 654 Bytes

Contents

module DeepTest
  module StartWorkers
    def self.run(args)
      processes, pattern = args
      processes.to_i.times do
        Daemons.run_proc "deep_test_worker", :multiple => true, :ARGV => ["start"], :backtrace => true, :log_output => true do
          require "deep_test"
          ENV["RAILS_ENV"] = "test"
          Object.const_set "RAILS_ENV", "test"
          Dir.glob(pattern).each { |file| load file }
          blackboard = DeepTest::RindaBlackboard.new
          DeepTest::Worker.new(blackboard).run
        end
      end
    end
  end
end

if __FILE__ == $0
  require "rubygems"
  require "daemons"
  DeepTest::StartWorkers.run ARGV
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
deep_test-1.0.1 lib/deep_test/start_workers.rb
deep_test-1.0.2 lib/deep_test/start_workers.rb
deep_test-1.0.3 lib/deep_test/start_workers.rb
deep_test-1.0.4 lib/deep_test/start_workers.rb