Class: Scout::Command::Realtime

Inherits:
Scout::Command show all
Defined in:
lib/scout/command/realtime.rb

Constant Summary

Constants inherited from Scout::Command

HTTP_HEADERS

Constants included from HTTP

HTTP::CA_FILE, HTTP::VERIFY_MODE

Instance Attribute Summary

Attributes inherited from Scout::Command

#config_dir, #history, #hostname, #log_path, #server, #server_name

Instance Method Summary collapse

Methods inherited from Scout::Command

#create_pid_file_or_exit, dispatch, #initialize, #level, #log, program_name, #program_name, program_path, #program_path, usage, #usage, user, #user, #verbose?

Methods included from HTTP

#build_http

Constructor Details

This class inherits a constructor from Scout::Command

Instance Method Details

#runObject



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/scout/command/realtime.rb', line 4

def run
  streamer_command = @args.first
  # Spawn or stop streamer as needed
  if streamer_command.start_with?("start")
    puts "streamer command: start"
    Scout::StreamerDaemon.start_daemon(history, streamer_command, @hostname, @http_proxy)
  elsif streamer_command == "stop"
    puts "streamer command: stop"
    Scout::StreamerDaemon.stop_daemon(history)
  end
end