From 1cf8b103a8db76680fbfdf5d0ac695bfbc467f63 Mon Sep 17 00:00:00 2001 From: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> Date: Mon, 8 Dec 2025 19:23:35 +0000 Subject: [PATCH] chore: only sleep if delay is greater than 0 seconds This prevents the warning: Swoole\Coroutine::sleep(): Timer must be greater than or equal to 0.001 --- src/Appwrite/Platform/Tasks/ScheduleExecutions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Tasks/ScheduleExecutions.php b/src/Appwrite/Platform/Tasks/ScheduleExecutions.php index b08f78e73c..3f08815d8c 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleExecutions.php +++ b/src/Appwrite/Platform/Tasks/ScheduleExecutions.php @@ -64,7 +64,9 @@ class ScheduleExecutions extends ScheduleBase $this->updateProjectAccess($schedule['project'], $dbForPlatform); \go(function () use ($queueForFunctions, $schedule, $scheduledAt, $delay, $data) { - Co::sleep($delay); + if ($delay > 0) { + Co::sleep($delay); + } $queueForFunctions->setType('schedule') // Set functionId instead of function as we don't have $dbForProject