Class: WebAdminApp

Inherits:
Sinatra::Base
  • Object
show all
Includes:
Splash::Config, Splash::Daemon::Controller, Splash::Exiter, Splash::Helpers, Splash::Loggers, Splash::Logs, Splash::Processes, Splash::Transports
Defined in:
lib/splash/webadmin/main.rb

Constant Summary

Constants included from Splash::Constants

Splash::Constants::AUTHOR, Splash::Constants::BACKENDS_STRUCT, Splash::Constants::CONFIG_FILE, Splash::Constants::COPYRIGHT, Splash::Constants::DAEMON_LOGMON_SCHEDULING, Splash::Constants::DAEMON_METRICS_SCHEDULING, Splash::Constants::DAEMON_PID_FILE, Splash::Constants::DAEMON_PROCESS_NAME, Splash::Constants::DAEMON_PROCMON_SCHEDULING, Splash::Constants::DAEMON_STDERR_TRACE, Splash::Constants::DAEMON_STDOUT_TRACE, Splash::Constants::DEFAULT_RETENTION, Splash::Constants::EMAIL, Splash::Constants::EXECUTION_TEMPLATE, Splash::Constants::EXECUTION_TEMPLATE_TOKENS_LIST, Splash::Constants::LICENSE, Splash::Constants::LOGGERS_STRUCT, Splash::Constants::PID_PATH, Splash::Constants::PROMETHEUS_ALERTMANAGER_URL, Splash::Constants::PROMETHEUS_PUSHGATEWAY_URL, Splash::Constants::PROMETHEUS_URL, Splash::Constants::TRACE_PATH, Splash::Constants::TRANSPORTS_STRUCT, Splash::Constants::VERSION, Splash::Constants::WEBADMIN_IP, Splash::Constants::WEBADMIN_PID_FILE, Splash::Constants::WEBADMIN_PID_PATH, Splash::Constants::WEBADMIN_PORT, Splash::Constants::WEBADMIN_PROCESS_NAME, Splash::Constants::WEBADMIN_PROXY, Splash::Constants::WEBADMIN_STDERR_TRACE, Splash::Constants::WEBADMIN_STDOUT_TRACE

Constants included from Splash::Loggers

Splash::Loggers::ALIAS, Splash::Loggers::LEVELS

Constants included from Splash::Exiter

Splash::Exiter::EXIT_MAP

Instance Method Summary collapse

Methods included from Splash::Transports

#get_default_client, #get_default_subscriber

Methods included from Splash::Config

#get_config, #rehash_config

Methods included from Splash::ConfigUtilities

#addservice, #checkconfig, #flush_backend, #setupsplash

Methods included from Splash::Helpers

#check_unicode_term, #daemonize, #format_by_extensions, #format_response, #get_processes, #group_root, #install_file, #is_root?, #make_folder, #make_link, #run_as_root, #search_file_in_gem, #user_root, #verify_file, #verify_folder, #verify_link, #verify_service

Methods included from Splash::Daemon::Controller

#startdaemon, #statusdaemon, #stopdaemon

Methods included from Splash::Loggers

#change_logger, #get_logger, #get_session

Methods included from Splash::Exiter

#splash_exit, #splash_return

Instance Method Details

#rehash_daemonObject



25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/splash/webadmin/main.rb', line 25

def rehash_daemon
  status = get_processes({ :pattern => get_config.daemon_process_name}).empty?
  if status == false then
    transport = get_default_client
    unless transport.class == Hash  and transport.include? :case then
      transport.publish queue: "splash.#{Socket.gethostname}.input",
                        message: { :verb => :reset,
                          :return_to => :ignore,
                          :queue => "splash.#{Socket.gethostname}.input" }.to_yaml
    end
  end
end