class Citrus::Master::Master
Public Class Methods
new(app, args={})
click to toggle source
Create a new master
@param [Object] app @param [Hash] args
# File lib/citrus/master/master.rb, line 24 def initialize app, args={} @app = app @master = true @master_info = app.master @modules = [] @close_watcher = args[:close_watcher] @console_service = CitrusAdmin::ConsoleService.create_master_console( args.merge({ :env => app.env, :port => @master_info[:port] }) ) end
Public Instance Methods
start() { |err| ... }
click to toggle source
Start master
# File lib/citrus/master/master.rb, line 39 def start &block register_default_modules load_modules @console_service.start { |err| exit if err start_modules { |err| if err block_given? and yield err return end run_servers block_given? and yield } } end
stop(&block)
click to toggle source
Stop master
# File lib/citrus/master/master.rb, line 56 def stop &block end