From 3adf8d826deaa9cb84b906b8d82e010f8ff2b274 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 6 Aug 2025 16:34:49 +0300 Subject: [PATCH] Run tests --- .../Platform/Modules/Functions/Http/Executions/Create.php | 5 +++-- src/Appwrite/Platform/Workers/Audits.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php b/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php index 905acf15df..507437a04a 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php @@ -285,6 +285,7 @@ class Create extends Base if ($async) { if (is_null($scheduledAt)) { $execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution)); + $queueForFunctions ->setType('http') ->setExecution($execution) @@ -312,7 +313,7 @@ class Create extends Base 'region' => $project->getAttribute('region'), 'resourceType' => ScheduleExecutions::getSupportedResource(), 'resourceId' => $execution->getId(), - 'resourceInternalId' => $execution->getSequence(), + 'resourceInternalId' => $execution->getSequence() ?? '', // resourceInternalId is required and may be empty 'resourceUpdatedAt' => DateTime::now(), 'projectId' => $project->getId(), 'schedule' => $scheduledAt, @@ -320,7 +321,7 @@ class Create extends Base 'active' => true, ])); - $execution = $execution + $execution ->setAttribute('scheduleId', $schedule->getId()) ->setAttribute('scheduleInternalId', $schedule->getSequence()) ->setAttribute('scheduledAt', $scheduledAt); diff --git a/src/Appwrite/Platform/Workers/Audits.php b/src/Appwrite/Platform/Workers/Audits.php index 023b3262b4..e4f997a408 100644 --- a/src/Appwrite/Platform/Workers/Audits.php +++ b/src/Appwrite/Platform/Workers/Audits.php @@ -89,7 +89,7 @@ class Audits extends Action // Create event data $eventData = [ - 'userId' => $user->getSequence() ?? '', + 'userId' => $user->getSequence() ?? '', // userId is required in Audit 'event' => $event, 'resource' => $resource, 'userAgent' => $userAgent,