status: fixed

This commit is contained in:
Denis Knauf 2010-04-03 13:04:47 +02:00
parent 7a244cd465
commit 338daed210

View file

@ -90,6 +90,7 @@ module LogAn::Inc
# Select-framework # Select-framework
@select = LogAn::Inc::Select.new @select = LogAn::Inc::Select.new
@status = method :status
status # Init Status status # Init Status
# Prepare Inc-server - create server # Prepare Inc-server - create server
@ -107,10 +108,10 @@ module LogAn::Inc
end end
def status def status
@select.at Time.now+5, &@status
LogAn::Logging.info :recv_lines => @logs.counter, LogAn::Logging.info :recv_lines => @logs.counter,
:connections => @serv && @serv.clients.map {|cl| cl.sock.peeraddr } :connections => @serv && @serv.clients.map {|cl| cl.sock.peeraddr }
@conf[ :stores].each {|key, db| db.flush!} @conf[ :stores].each {|key, db| db.flush!}
@select.at Time.now+5, &status
end end
# Will be called at exit. Will close all opened BDB::Env # Will be called at exit. Will close all opened BDB::Env