mirror of
https://github.com/appwrite/appwrite
synced 2026-05-21 07:58:55 +00:00
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:
parent
be5f066dc3
commit
1cf8b103a8
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue