This commit is contained in:
Philipp 2023-05-14 11:18:59 +02:00
parent a74c0e86c9
commit 8c2678c82f
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
3 changed files with 13 additions and 10 deletions

View file

@ -88,8 +88,10 @@ final class DeliveryQueueItem extends \Friendica\BaseRepository
public function remove(Entity\DeliveryQueueItem $deliveryQueueItem): bool
{
return $this->db->delete(self::$table_name, ['uri-id' => $deliveryQueueItem->postUriId,
'gsid' => $deliveryQueueItem->targetServerId]);
return $this->db->delete(self::$table_name, [
'uri-id' => $deliveryQueueItem->postUriId,
'gsid' => $deliveryQueueItem->targetServerId
]);
}
public function removeFailedByServerId(int $gsid, int $failedThreshold): bool
@ -99,11 +101,13 @@ final class DeliveryQueueItem extends \Friendica\BaseRepository
public function incrementFailed(Entity\DeliveryQueueItem $deliveryQueueItem): bool
{
return $this->db->update(self::$table_name, ["`failed` = `failed` + 1"],
["`uri-id` = ? AND `gsid` = ?",
$deliveryQueueItem->postUriId,
$deliveryQueueItem->targetServerId
]);
return $this->db->update(self::$table_name, [
"`failed` = `failed` + 1"
], [
"`uri-id` = ? AND `gsid` = ?",
$deliveryQueueItem->postUriId,
$deliveryQueueItem->targetServerId
]);
}
public function optimizeStorage(): bool