forked from GNUsocial/gnu-social
some logging for queues
darcs-hash:20080704055259-84dde-1bc6947531632f0d9d93277f6138cc81c82196af.gz
This commit is contained in:
parent
d0897f4d1f
commit
94a7924767
@ -52,11 +52,15 @@ function qd_top_item() {
|
|||||||
# XXX: potential race condition
|
# XXX: potential race condition
|
||||||
# can we force it to only update if claimed is still NULL
|
# can we force it to only update if claimed is still NULL
|
||||||
# (or old)?
|
# (or old)?
|
||||||
|
qd_log(LOG_INFO, 'claiming queue item = ' . $queue->notice_id);
|
||||||
$orig = clone($qi);
|
$orig = clone($qi);
|
||||||
$qi->claimed = DB_DataObject_Cast::dateTime();
|
$qi->claimed = DB_DataObject_Cast::dateTime();
|
||||||
$result = $qi->update($orig);
|
$result = $qi->update($orig);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
|
qd_log(LOG_INFO, 'claim succeeded.');
|
||||||
return $qi;
|
return $qi;
|
||||||
|
} else {
|
||||||
|
qd_log(LOG_INFO, 'claim failed.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$qi = NULL;
|
$qi = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user