fixups
This commit is contained in:
parent
a74c0e86c9
commit
8c2678c82f
3 changed files with 13 additions and 10 deletions
|
@ -58,7 +58,7 @@ class DBStructure
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dops a specific table
|
* Drops a specific table
|
||||||
*
|
*
|
||||||
* @param string $table the table name
|
* @param string $table the table name
|
||||||
*
|
*
|
||||||
|
|
|
@ -45,9 +45,8 @@ class DatabaseException extends Exception
|
||||||
*/
|
*/
|
||||||
public function __construct(string $message, int $code, string $query, Throwable $previous = null)
|
public function __construct(string $message, int $code, string $query, Throwable $previous = null)
|
||||||
{
|
{
|
||||||
$this->query = $query;
|
|
||||||
|
|
||||||
parent::__construct(sprintf('"%s" at "%s"', $message, $query) , $code, $previous);
|
parent::__construct(sprintf('"%s" at "%s"', $message, $query) , $code, $previous);
|
||||||
|
$this->query = $query;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -88,8 +88,10 @@ final class DeliveryQueueItem extends \Friendica\BaseRepository
|
||||||
|
|
||||||
public function remove(Entity\DeliveryQueueItem $deliveryQueueItem): bool
|
public function remove(Entity\DeliveryQueueItem $deliveryQueueItem): bool
|
||||||
{
|
{
|
||||||
return $this->db->delete(self::$table_name, ['uri-id' => $deliveryQueueItem->postUriId,
|
return $this->db->delete(self::$table_name, [
|
||||||
'gsid' => $deliveryQueueItem->targetServerId]);
|
'uri-id' => $deliveryQueueItem->postUriId,
|
||||||
|
'gsid' => $deliveryQueueItem->targetServerId
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeFailedByServerId(int $gsid, int $failedThreshold): bool
|
public function removeFailedByServerId(int $gsid, int $failedThreshold): bool
|
||||||
|
@ -99,8 +101,10 @@ final class DeliveryQueueItem extends \Friendica\BaseRepository
|
||||||
|
|
||||||
public function incrementFailed(Entity\DeliveryQueueItem $deliveryQueueItem): bool
|
public function incrementFailed(Entity\DeliveryQueueItem $deliveryQueueItem): bool
|
||||||
{
|
{
|
||||||
return $this->db->update(self::$table_name, ["`failed` = `failed` + 1"],
|
return $this->db->update(self::$table_name, [
|
||||||
["`uri-id` = ? AND `gsid` = ?",
|
"`failed` = `failed` + 1"
|
||||||
|
], [
|
||||||
|
"`uri-id` = ? AND `gsid` = ?",
|
||||||
$deliveryQueueItem->postUriId,
|
$deliveryQueueItem->postUriId,
|
||||||
$deliveryQueueItem->targetServerId
|
$deliveryQueueItem->targetServerId
|
||||||
]);
|
]);
|
||||||
|
|
Loading…
Reference in a new issue