summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlezvous.ca>2008-07-04 04:32:16 -0400
committerEvan Prodromou <evan@controlezvous.ca>2008-07-04 04:32:16 -0400
commit350b6f63a559a2ad953a11bec2b6f6d713ca867a (patch)
tree6c85c36ad23e69b168e27bf40b636673784e3d39 /lib
parentcec671443d7bb420d07fef72a77ac45d10cb03d4 (diff)
UNDO: debugging info for queueing notices
darcs-hash:20080704083216-34904-b1129dd872951f7659de01c991cc00a4c3d276d0.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/util.php18
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/util.php b/lib/util.php
index b7e78d3bb..60242eaf7 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -866,7 +866,7 @@ function common_save_replies($notice) {
function common_broadcast_notice($notice, $remote=false) {
if (common_config('queue', 'enabled')) {
# Do it later!
- common_enqueue_notice($notice);
+ return common_enqueue_notice($notice);
} else {
return common_real_broadcast($notice, $remote);
}
@@ -875,23 +875,17 @@ function common_broadcast_notice($notice, $remote=false) {
# Stick the notice on the queue
function common_enqueue_notice($notice) {
- common_log(LOG_DEBUG, 'start queueing notice ID = ' . $notice->id);
+ common_log(LOG_INFO, 'start queueing notice ID = ' . $notice->id);
$qi = new Queue_item();
- common_log(LOG_DEBUG, 'got a new qi object');
$qi->notice_id = $notice->id;
- common_log(LOG_DEBUG, 'got a new id:' . $qi->notice_id);
- $qi->created = $notice->created;
- common_log(LOG_DEBUG, 'set created date');
- common_log(LOG_DEBUG, print_r($qi, true));
- $result = $qi->insert();
- common_log(LOG_DEBUG, 'inserted');
- if (!$result) {
+ $qi->created = DB_DataObject_Cast::dateTime();
+ $result = $qi->insert();
+ if ($result === FALSE) {
$last_error = &PEAR::getStaticProperty('DB_DataObject','lastError');
common_log(LOG_ERROR, 'DB error inserting queue item: ' . $last_error->message);
return false;
}
- common_log(LOG_DEBUG, print_r($qi, true));
- common_log(LOG_DEBUG, 'complete queueing notice ID = ' . $notice->id);
+ common_log(LOG_INFO, 'complete queueing notice ID = ' . $notice->id);
return $result;
}