8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/ruby_app/rack/application.rb', line 8
def initialize(application, options = {})
@application = application
RubyApp::Configuration.load!(options[:configuration_paths])
RubyApp::Log.open!
RubyApp::Application.create!
RubyApp::Session.start_thread!
Signal.trap('HUP') do
begin
RubyApp::Log.reopen!
rescue => exception
RubyApp::Log.exception(RubyApp::Log::ERROR, exception)
end
end
Signal.trap('EXIT') do
begin
RubyApp::Session.stop_thread!
RubyApp::Application.destroy!
RubyApp::Log.close!
RubyApp::Configuration.unload!
rescue => exception
RubyApp::Log.exception(RubyApp::Log::ERROR, exception)
end
end
end
|