Method: Controller#initialize

Defined in:
bin/magent

#initialize(opts) ⇒ Controller

Returns a new instance of Controller.



77
78
79
80
81
82
83
84
85
86
87
88
# File 'bin/magent', line 77

def initialize(opts)
  @options = opts

  @queue = @options[:queue]

  @options[:log_path] ||= Dir.getwd

  @identity = @options[:identifier] || Magent::Utils.underscore(@options[:queue].to_s)
  @identity << "-#{Socket.gethostname.split('.')[0]}"

  $stderr.puts ">> Starting magent in #{@options[:type]} model"
end