diff options
Diffstat (limited to 'classes/Queue_item.php')
-rw-r--r-- | classes/Queue_item.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/classes/Queue_item.php b/classes/Queue_item.php index 4d90e1d23..cf805a606 100644 --- a/classes/Queue_item.php +++ b/classes/Queue_item.php @@ -10,8 +10,7 @@ class Queue_item extends Memcached_DataObject /* the code below is auto generated do not remove the above tag */ public $__table = 'queue_item'; // table name - public $id; // int(4) primary_key not_null - public $frame; // blob not_null + public $notice_id; // int(4) primary_key not_null public $transport; // varchar(8) primary_key not_null public $created; // datetime() not_null public $claimed; // datetime() @@ -23,6 +22,9 @@ class Queue_item extends Memcached_DataObject /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE + function sequenceKey() + { return array(false, false); } + static function top($transport=null) { $qi = new Queue_item(); @@ -40,7 +42,7 @@ 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 id=' . $qi->id . + common_log(LOG_INFO, 'claiming queue item = ' . $qi->notice_id . ' for transport ' . $qi->transport); $orig = clone($qi); $qi->claimed = common_sql_now(); @@ -55,4 +57,9 @@ class Queue_item extends Memcached_DataObject $qi = null; return null; } + + function pkeyGet($kv) + { + return Memcached_DataObject::pkeyGet('Queue_item', $kv); + } } |