Merge remote branch 'statusnet/1.0.x' into msn-plugin
This commit is contained in:
commit
f122d0b660
|
@ -64,4 +64,17 @@ class Queue_item extends Memcached_DataObject
|
||||||
$qi = null;
|
$qi = null;
|
||||||
return 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,9 +135,7 @@ class DBQueueManager extends QueueManager
|
||||||
if (empty($qi->claimed)) {
|
if (empty($qi->claimed)) {
|
||||||
$this->_log(LOG_WARNING, "[$queue:item $qi->id] Ignoring failure for unclaimed queue item");
|
$this->_log(LOG_WARNING, "[$queue:item $qi->id] Ignoring failure for unclaimed queue item");
|
||||||
} else {
|
} else {
|
||||||
$orig = clone($qi);
|
$qi->releaseClaim();
|
||||||
$qi->claimed = null;
|
|
||||||
$qi->update($orig);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->stats('error', $queue);
|
$this->stats('error', $queue);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user