From 07bfe3823c6f6033f3d4f7cc44064a20dd2c6df3 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 29 May 2024 18:59:10 +0300 Subject: [PATCH] getCollectionId --- src/Appwrite/Platform/Tasks/ScheduleBase.php | 1 + src/Appwrite/Platform/Tasks/ScheduleFunctions.php | 5 +++++ src/Appwrite/Platform/Tasks/ScheduleMessages.php | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/src/Appwrite/Platform/Tasks/ScheduleBase.php b/src/Appwrite/Platform/Tasks/ScheduleBase.php index 5dbc52f886..af7fe9d221 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleBase.php +++ b/src/Appwrite/Platform/Tasks/ScheduleBase.php @@ -24,6 +24,7 @@ abstract class ScheduleBase extends Action abstract public static function getName(): string; abstract public static function getSupportedResource(): string; + abstract public static function getCollectionId(): string; abstract protected function enqueueResources(Group $pools, Database $dbForConsole, callable $getProjectDB):void; public function __construct() diff --git a/src/Appwrite/Platform/Tasks/ScheduleFunctions.php b/src/Appwrite/Platform/Tasks/ScheduleFunctions.php index 98a935876a..4d57902330 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleFunctions.php +++ b/src/Appwrite/Platform/Tasks/ScheduleFunctions.php @@ -26,6 +26,11 @@ class ScheduleFunctions extends ScheduleBase return 'function'; } + public static function getCollectionId(): string + { + return 'functions'; + } + protected function enqueueResources(Group $pools, Database $dbForConsole, callable $getProjectDB): void { $timerStart = \microtime(true); diff --git a/src/Appwrite/Platform/Tasks/ScheduleMessages.php b/src/Appwrite/Platform/Tasks/ScheduleMessages.php index ac2eaa3302..5629979dce 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleMessages.php +++ b/src/Appwrite/Platform/Tasks/ScheduleMessages.php @@ -21,6 +21,11 @@ class ScheduleMessages extends ScheduleBase return 'message'; } + public static function getCollectionId(): string + { + return 'messages'; + } + protected function enqueueResources(Group $pools, Database $dbForConsole, callable $getProjectDB): void { foreach ($this->schedules as $schedule) {