diff options
author | Zach Copley <zach@status.net> | 2010-01-13 19:17:49 +0000 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-01-13 19:17:49 +0000 |
commit | c3188fd1fece2be7f7c4211d28f4a3d3a59c8fa1 (patch) | |
tree | aa8018e132936b00fc63224e75ca134d68999b4e /classes/Queue_item.php | |
parent | 43170b3d18153b3dfd8675bd77ae1133eed8148a (diff) | |
parent | 0e1f2d4b47e5e340679c4245b62e1d64c6b9c9b9 (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'classes/Queue_item.php')
-rw-r--r-- | classes/Queue_item.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/classes/Queue_item.php b/classes/Queue_item.php index 9c673540d..cf805a606 100644 --- a/classes/Queue_item.php +++ b/classes/Queue_item.php @@ -25,10 +25,12 @@ class Queue_item extends Memcached_DataObject function sequenceKey() { return array(false, false); } - static function top($transport) { + static function top($transport=null) { $qi = new Queue_item(); - $qi->transport = $transport; + if ($transport) { + $qi->transport = $transport; + } $qi->orderBy('created'); $qi->whereAdd('claimed is null'); @@ -40,7 +42,8 @@ class Queue_item extends Memcached_DataObject # XXX: potential race condition # can we force it to only update if claimed is still null # (or old)? - common_log(LOG_INFO, 'claiming queue item = ' . $qi->notice_id . ' for transport ' . $transport); + common_log(LOG_INFO, 'claiming queue item = ' . $qi->notice_id . + ' for transport ' . $qi->transport); $orig = clone($qi); $qi->claimed = common_sql_now(); $result = $qi->update($orig); |