From 8c8e5ae926e0009743fe92dccb588783640a6022 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Wed, 17 Aug 2011 11:08:07 +0100 Subject: * Reminder notifications now take the same path to notify as initial alerts * Threading tidied -- processor will not do anything unless the timer has frozen * Person#send_alert now tidied and merged with alert_changed * POP3 server only shows alerts relevant to the user * Server now defaults to using an in-memory SQLite database (good for testing) * Server initializes a blank mauve config. * Tests tidied up --- lib/mauve/processor.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/mauve/processor.rb') diff --git a/lib/mauve/processor.rb b/lib/mauve/processor.rb index 86ed5dd..d68c551 100644 --- a/lib/mauve/processor.rb +++ b/lib/mauve/processor.rb @@ -34,6 +34,13 @@ module Mauve sz = Server.packet_buffer_size sz.times do + Timer.instance.freeze if Timer.instance.alive? and !Timer.instance.frozen? + + # + # Hmm.. timer not frozen. + # + break unless Timer.instance.frozen? + data, client, received_at = Server.packet_pop # @@ -41,7 +48,6 @@ module Mauve # break if data.nil? - Timer.instance.freeze if Timer.instance.alive? and !Timer.instance.frozen? # logger.debug("Got #{data.inspect} from #{client.inspect}") -- cgit v1.2.1