lib/splash/webadmin/main.rb in prometheus-splash-0.8.4 vs lib/splash/webadmin/main.rb in prometheus-splash-0.8.5

- old
+ new

@@ -7,10 +7,11 @@ include Splash::Exiter include Splash::Loggers include Splash::Daemon::Controller include Splash::Logs include Splash::Processes + include Splash::Transports set :server, 'thin' set :port, get_config.webadmin_port set :bind, get_config.webadmin_ip set :static, :enable @@ -19,10 +20,21 @@ before do rehash_config end - + 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 end require 'splash/webadmin/portal/init' require 'splash/webadmin/api/routes/init'