mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 17:08:45 +00:00
Merge pull request #10916 from appwrite/copilot/fix-schedule-executions-bug
Fix ScheduleExecutions: inverted comparison prevented execution scheduling
This commit is contained in:
commit
3a3c92140b
1 changed files with 4 additions and 2 deletions
|
|
@ -50,7 +50,7 @@ class ScheduleExecutions extends ScheduleBase
|
|||
}
|
||||
|
||||
$scheduledAt = new \DateTime($schedule['schedule']);
|
||||
if ($scheduledAt <= $intervalEnd) {
|
||||
if ($scheduledAt > $intervalEnd) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -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