Flowdock
method

spawn_all

Importance_0
v2.2.1 - Show latest stable - 0 notes - Class: Spawner
spawn_all() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/commands/process/spawner.rb, line 23
  def self.spawn_all
    OPTIONS[:instances].times do |i|
      port = OPTIONS[:port] + i
      print "Checking if something is already running on #{OPTIONS[:address]}:#{port}..."

      begin
        srv = TCPServer.new(OPTIONS[:address], port)
        srv.close
        srv = nil

        puts "NO"
        puts "Starting dispatcher on port: #{OPTIONS[:address]}:#{port}"

        FileUtils.mkdir_p(OPTIONS[:pids])
        spawn(port)
      rescue
        puts "YES"
      end
    end
  end
Register or log in to add new notes.