From: Zach Copley Date: Tue, 27 Jan 2009 22:23:37 +0000 (-0800) Subject: Better logging for update_facebook script. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=500802320693401b5a76ddc351fc70359f6e1b47;p=quix0rs-gnu-social.git Better logging for update_facebook script. --- diff --git a/scripts/update_facebook.php b/scripts/update_facebook.php index d2c1c3ffb9..485b2a342d 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);