Class: Expedite::Action::Boot

Inherits:
Object
  • Object
show all
Defined in:
lib/expedite/action/boot.rb

Instance Method Summary collapse

Instance Method Details

#call(*args) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/expedite/action/boot.rb', line 4

def call(*args)
  name = args[0]

  require "expedite/server/agent"

  Expedite::Server::Agent.new(
    name: name,
    manager: UNIXSocket.for_fd(@child_socket.fileno),
    env: Expedite::Env.new(
      root: ENV['EXPEDITE_ROOT'],
      log_file: @log_file,
    ),
  ).boot
end

#runs_inObject



25
26
27
# File 'lib/expedite/action/boot.rb', line 25

def runs_in
  :server
end

#setup(streams) ⇒ Object

STDOUT, STDERR, STDIN, log, child_socket



20
21
22
23
# File 'lib/expedite/action/boot.rb', line 20

def setup(streams)
  @log_file = streams[3]
  @child_socket = streams[4]
end