mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
chore: update schedule functions task
This commit is contained in:
parent
309fde38f7
commit
9ab9f6d709
1 changed files with 7 additions and 3 deletions
|
|
@ -19,7 +19,7 @@ class ScheduleFunctions extends ScheduleBase
|
|||
public const UPDATE_TIMER = 10; // seconds
|
||||
public const ENQUEUE_TIMER = 60; // seconds
|
||||
|
||||
private ?float $lastEnqueueUpdate = null;
|
||||
protected ?float $lastEnqueueUpdate = null;
|
||||
|
||||
public static function getName(): string
|
||||
{
|
||||
|
|
@ -36,6 +36,11 @@ class ScheduleFunctions extends ScheduleBase
|
|||
return RESOURCE_TYPE_FUNCTIONS;
|
||||
}
|
||||
|
||||
protected function getQueueForFunctions(): Func
|
||||
{
|
||||
return new Func($this->publisherFunctions);
|
||||
}
|
||||
|
||||
protected function enqueueResources(Database $dbForPlatform, callable $getProjectDB): void
|
||||
{
|
||||
$timerStart = \microtime(true);
|
||||
|
|
@ -95,8 +100,7 @@ class ScheduleFunctions extends ScheduleBase
|
|||
|
||||
$this->updateProjectAccess($schedule['project'], $dbForPlatform);
|
||||
|
||||
$queueForFunctions = new Func($this->publisherFunctions);
|
||||
|
||||
$queueForFunctions = $this->getQueueForFunctions();
|
||||
$queueForFunctions
|
||||
->setType('schedule')
|
||||
->setFunction($schedule['resource'])
|
||||
|
|
|
|||
Loading…
Reference in a new issue