forked from GNUsocial/gnu-social
Modernize Queue_item to use Managed_DataObject functions
This commit is contained in:
parent
f9698598c6
commit
fc9de94cbd
@ -63,7 +63,7 @@ class Queue_item extends Managed_DataObject
|
|||||||
// 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)?
|
||||||
common_log(LOG_INFO, 'claiming queue item id = ' . $qi->id .
|
common_log(LOG_INFO, 'claiming queue item id = ' . $qi->getID() .
|
||||||
' for transport ' . $qi->transport);
|
' for transport ' . $qi->transport);
|
||||||
$orig = clone($qi);
|
$orig = clone($qi);
|
||||||
$qi->claimed = common_sql_now();
|
$qi->claimed = common_sql_now();
|
||||||
@ -85,7 +85,7 @@ class Queue_item extends Managed_DataObject
|
|||||||
function releaseClaim()
|
function releaseClaim()
|
||||||
{
|
{
|
||||||
// DB_DataObject doesn't let us save nulls right now
|
// DB_DataObject doesn't let us save nulls right now
|
||||||
$sql = sprintf("UPDATE queue_item SET claimed=NULL WHERE id=%d", $this->id);
|
$sql = sprintf("UPDATE queue_item SET claimed=NULL WHERE id=%d", $this->getID());
|
||||||
$this->query($sql);
|
$this->query($sql);
|
||||||
|
|
||||||
$this->claimed = null;
|
$this->claimed = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user