summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-06-26 15:09:08 -0400
committerBrion Vibber <brion@pobox.com>2010-06-26 15:09:08 -0400
commitef7e85c0ab79dcac5239aaee2e3f329588db6397 (patch)
tree1e7fb04d0e90b82f55981e02b3ed3c8b74cda27b /classes
parentd9e56e15cc3174093fc994e524d1d9cf402ae8a3 (diff)
parentf0c5e7eca3842411d4e3ee6efb3fd6ac0ad85f4a (diff)
Merge branch 'master' of gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'classes')
-rw-r--r--classes/Queue_item.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/classes/Queue_item.php b/classes/Queue_item.php
index f83c2cef1..c7e17be6e 100644
--- a/classes/Queue_item.php
+++ b/classes/Queue_item.php
@@ -64,4 +64,17 @@ class Queue_item extends Memcached_DataObject
$qi = null;
return null;
}
+
+ /**
+ * Release a claimed item.
+ */
+ function releaseCLaim()
+ {
+ // DB_DataObject doesn't let us save nulls right now
+ $sql = sprintf("UPDATE queue_item SET claimed=NULL WHERE id=%d", $this->id);
+ $this->query($sql);
+
+ $this->claimed = null;
+ $this->encache();
+ }
}