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
This commit is contained in:
Steven Nguyen 2025-12-08 19:23:35 +00:00 committed by GitHub
parent be5f066dc3
commit 1cf8b103a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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