From 500802320693401b5a76ddc351fc70359f6e1b47 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Tue, 27 Jan 2009 14:23:37 -0800 Subject: Better logging for update_facebook script. --- scripts/update_facebook.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/update_facebook.php b/scripts/update_facebook.php index d2c1c3ffb..485b2a342 100755 --- a/scripts/update_facebook.php +++ b/scripts/update_facebook.php @@ -46,9 +46,9 @@ $facebook = getFacebook(); $current_time = time(); -$notice = getFacebookNotices(getLastUpdated()); +$since = getLastUpdated(); -print date('r', $current_time) . " Looking for notices to send to Facebook...\n"; +$notice = getFacebookNotices($since); $cnt = 0; @@ -81,9 +81,13 @@ while($notice->fetch()) { } } -updateLastUpdated($current_time); +if ($cnt > 0) { + print date('r', $current_time) . + ": Found $cnt new notices to send to Facebook since last run at " . + date('Y-m-d H:i:s', $since) . "\n"; -print "Sent $cnt notices to Facebook.\n"; + updateLastUpdated($current_time); +} exit(0); -- cgit v1.2.3-54-g00ecf