Class: TestServer::Cli::Reload
- Inherits:
-
Thor
- Object
- Thor
- TestServer::Cli::Reload
- Defined in:
- lib/test_server/cli/reload.rb
Instance Method Summary collapse
Instance Method Details
#configuration ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/test_server/cli/reload.rb', line 10 def configuration TestServer.config = TestServer::Config.new([:config_file]) if [:config_file] TestServer.config.log_level = [:log_level] if [:log_level] TestServer.config.debug_mode = [:debug_mode] if [:debug_mode] TestServer.config.pid_file = [:pid_file] if [:pid_file] TestServer.config.lock TestServer.ui_logger.level = TestServer.config.log_level TestServer.enable_debug_mode if TestServer.config.debug_mode TestServer.ui_logger.info "Ask web application (PID: #{pid(TestServer.config)}) to reload configuration" Actions::SendSignal.new(TestServer.config.reload_config_signal).run end |
#local_storage ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/test_server/cli/reload.rb', line 25 def local_storage TestServer.config = TestServer::Config.new([:config_file]) if [:config_file] TestServer.config.log_level = [:log_level] if [:log_level] TestServer.config.debug_mode = [:debug_mode] if [:debug_mode] TestServer.config.pid_file = [:pid_file] if [:pid_file] TestServer.config.lock TestServer.ui_logger.level = TestServer.config.log_level TestServer.enable_debug_mode if TestServer.config.debug_mode TestServer.ui_logger.info "Ask web application (PID: #{pid(TestServer.config)}) to reload storage" Actions::SendSignal.new(TestServer.config.reload_storage_signal).run end |