From: Thomas Hochstein Date: Fri, 12 Oct 2012 23:27:54 +0000 (+0200) Subject: Refactor database initialisation in feedlog.pl. X-Git-Tag: 0.01~1^2~8^2 X-Git-Url: https://code.th-h.de/?p=usenet%2Fnewsstats.git;a=commitdiff_plain;h=98563c619eeb66fee046c6acb3dfc0f14c442e8d;hp=98563c619eeb66fee046c6acb3dfc0f14c442e8d Refactor database initialisation in feedlog.pl. * Move database initialisation to a separate function. * (Re-)try to connect every five seconds (instead of going into an endless loop) and log successful (re-)connections. * Log postings that are dropped due to database failures to syslog (Message-ID) for recovery. * If the connection to the database is lost, try to recover it (every five seconds) and try again to write the pending data. * Input will be buffered automatically by INN until feedlog is able to process it (see man 5 newsfeeds). Fixes #30, #31. Signed-off-by: Thomas Hochstein ---