aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/http_server.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-06-15 19:44:07 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-06-15 19:44:07 +0100
commit42f14de6ab50d0e05f49f038e40b94b686701bf1 (patch)
tree33dc459cf3ae32de8956690a990f080321a67a83 /lib/mauve/http_server.rb
parent92e5d4e652aae161640359b41c0ba8dcaedac0ad (diff)
* Added Alert#subject to return source when subject unspecified
* Added extra arg to acknowledge! * Alert#all_raised / all_cleared does not returned ack'd alerts * Added sanitising for source/subject * Catch empty alert_group notifications in AlertChanged * Tidied up alert_group * Added skip bytemark_auth when RACK_ENV is development * Tidied up logging in MauveThread, Timer, UdpServer * Added extra convenience methods to Time and Date * Moved working/daylight/dead_zone hours into Time
Diffstat (limited to 'lib/mauve/http_server.rb')
-rw-r--r--lib/mauve/http_server.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/mauve/http_server.rb b/lib/mauve/http_server.rb
index 4fd8b60..21c89e5 100644
--- a/lib/mauve/http_server.rb
+++ b/lib/mauve/http_server.rb
@@ -57,7 +57,6 @@ class RackErrorsProxy
def initialize(l); @logger = l; end
def write(msg)
- #@logger.debug "NEXT LOG LINE COURTESY OF: "+caller.join("\n")
case msg
when String then @logger.info(msg.chomp)
when Array then @logger.info(msg.join("\n"))
@@ -68,6 +67,7 @@ class RackErrorsProxy
alias_method :<<, :write
alias_method :puts, :write
+
def flush; end
end
@@ -84,7 +84,7 @@ module Mauve
include Singleton
attr_accessor :port, :ip, :document_root
- attr_accessor :session_secret # not used yet
+ attr_accessor :session_secret
def initialize
@port = 1288
@@ -94,6 +94,9 @@ module Mauve
end
def main_loop
+ #
+ # Sessions are kept for 8 days.
+ #
@server = ::Thin::Server.new(@ip, @port, Rack::Session::Cookie.new(WebInterface.new, {:key => "mauvealert", :secret => @session_secret, :expire_after => 691200}), :signals => false)
@server.start
end