]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
some logging for queues
authorEvan Prodromou <evan@prodromou.name>
Fri, 4 Jul 2008 05:52:59 +0000 (01:52 -0400)
committerEvan Prodromou <evan@prodromou.name>
Fri, 4 Jul 2008 05:52:59 +0000 (01:52 -0400)
darcs-hash:20080704055259-84dde-1bc6947531632f0d9d93277f6138cc81c82196af.gz

queuedaemon.php

index 9d8a465a6dd56bad2f89dcc678bc76a6add9e68f..97de21490ea49764a783855f687111d8165aa5ff 100755 (executable)
@@ -52,11 +52,15 @@ function qd_top_item() {
                # XXX: potential race condition
                # can we force it to only update if claimed is still NULL
                # (or old)?
+               qd_log(LOG_INFO, 'claiming queue item = ' . $queue->notice_id);
                $orig = clone($qi);
                $qi->claimed = DB_DataObject_Cast::dateTime();
                $result = $qi->update($orig);
                if ($result) {
+                       qd_log(LOG_INFO, 'claim succeeded.');
                        return $qi;
+               } else {
+                       qd_log(LOG_INFO, 'claim failed.');
                }
        }
        $qi = NULL;