Method: HttpServerManager::Server#start!
- Defined in:
- lib/http_server_manager/server.rb
#start! ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/http_server_manager/server.rb', line 16 def start! if running? logger.info "#{@name} already running on #{@host}:#{@port}" else ensure_directories_exist pid = Process.spawn(start_command, %i{ out err } => [ log_file_path, "w" ]) create_pid_file(pid) Wait.until_true!(description: "#{@name} is running", timeout_in_seconds: @timeout_in_seconds) { running? } logger.info "#{@name} started on #{@host}:#{@port}" end end |