chore: update schedule functions task

This commit is contained in:
Chirag Aggarwal 2025-12-23 14:47:26 +05:30
parent 309fde38f7
commit 9ab9f6d709

View file

@ -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'])