Better logging for update_facebook script.

This commit is contained in:
Zach Copley 2009-01-27 14:23:37 -08:00
parent f9403ae99a
commit 5008023206
1 changed files with 8 additions and 4 deletions

View File

@ -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);