mirror of
https://github.com/friendica/friendica
synced 2025-05-01 13:44:24 +02:00
Add direct field possibility
This commit is contained in:
parent
db5078d51c
commit
557d0e3aeb
5 changed files with 83 additions and 16 deletions
|
@ -88,7 +88,8 @@ 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
|
||||
|
@ -98,12 +99,11 @@ final class DeliveryQueueItem extends \Friendica\BaseRepository
|
|||
|
||||
public function incrementFailed(Entity\DeliveryQueueItem $deliveryQueueItem): bool
|
||||
{
|
||||
return $this->db->e("
|
||||
UPDATE " . DBA::buildTableString([self::$table_name]) . "
|
||||
SET `failed` = `failed` + 1
|
||||
WHERE `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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue