From: Hypolite Petovan <hypolite@mrpetovan.com>
Date: Sat, 31 Dec 2022 19:37:04 +0000 (-0500)
Subject: Remove unused static methods related to delivery-queue
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a786bd37774d6ae947cd44dc3f236f297966c704;p=friendica.git

Remove unused static methods related to delivery-queue
---

diff --git a/src/Protocol/Delivery.php b/src/Protocol/Delivery.php
index e35433b0c9..a4fe943da5 100644
--- a/src/Protocol/Delivery.php
+++ b/src/Protocol/Delivery.php
@@ -606,68 +606,4 @@ class Delivery
 		}
 		return $success;
 	}
-
-	/**
-	 * Add post for a server
-	 *
-	 * @param string $cmd
-	 * @param integer $uri_id
-	 * @param string $created
-	 * @param integer $cid
-	 * @param integer $gsid
-	 * @param integer $uid
-	 * @return bool
-	 */
-	public static function addQueue(string $cmd, int $uri_id, string $created, int $cid, int $gsid, int $uid): bool
-	{
-		$fields = ['uri-id' => $uri_id, 'uid' => $uid, 'cid' => $cid, 'gsid' => $gsid, 'created' => $created, 'command' => $cmd];
-
-		return DBA::insert('delivery-queue', $fields, Database::INSERT_IGNORE);
-	}
-
-	/**
-	 * Remove post by a server after delivery
-	 *
-	 * @param integer $uri_id
-	 * @param integer $gsid
-	 * @return bool
-	 */
-	public static function removeQueue(int $uri_id, int $gsid): bool
-	{
-		return DBA::delete('delivery-queue', ['uri-id' => $uri_id, 'gsid' => $gsid]);
-	}
-
-	/**
-	 * Remove failed posts for the given server
-	 *
-	 * @param integer $gsid
-	 * @return bool
-	 */
-	public static function removeFailedQueue(int $gsid): bool
-	{
-		return DBA::delete('delivery-queue', ["`gsid` = ? AND `failed` >= ?", $gsid, DI::config()->get('system', 'worker_defer_limit')]);
-	}
-
-	/**
-	 * Increment "failed" counter for the given server and post
-	 *
-	 * @param integer $uri_id
-	 * @param integer $gsid
-	 * @return bool
-	 */
-	public static function incrementFailedQueue(int $uri_id, int $gsid): bool
-	{
-		return DBA::e('UPDATE `delivery-queue` SET `failed` = `failed` + 1 WHERE `uri-id` = ? AND `gsid` = ?', $uri_id, $gsid);
-	}
-
-	/**
-	 * Select queue entries for the given server
-	 *
-	 * @param integer $gsid
-	 * @return array
-	 */
-	public static function selectQueueForServer(int $gsid): array
-	{
-		return DBA::selectToArray('delivery-queue', [], ["`gsid` = ? AND `failed` < ?", $gsid, DI::config()->get('system', 'worker_defer_limit')], ['order' => ['created']]);
-	}
 }