From 5ee82afc8c3eeb99306bbc3397a399513acf7730 Mon Sep 17 00:00:00 2001 From: eldadfux Date: Thu, 25 Jun 2026 17:41:30 -0400 Subject: [PATCH] Remove unused queueForRealtime injection from API shutdown logic to streamline onboarding process. Adjust related action parameters for improved clarity and maintainability. --- app/controllers/shared/api.php | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 150a2bcd6b..e30305e55b 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -1119,12 +1119,11 @@ Http::shutdown() ->inject('response') ->inject('project') ->inject('user') - ->inject('queueForRealtime') ->inject('dbForPlatform') ->inject('authorization') ->inject('apiKey') ->inject('mode') - ->action(function (Route $route, Response $response, Document $project, User $user, Realtime $queueForRealtime, Database $dbForPlatform, Authorization $authorization, ?Key $apiKey, string $mode) { + ->action(function (Route $route, Response $response, Document $project, User $user, Database $dbForPlatform, Authorization $authorization, ?Key $apiKey, string $mode) { /** * Persist completed onboarding stage after usage shutdown so a schema/write failure here * cannot suppress RequestCompleted or usage metrics on the same request. @@ -1198,21 +1197,6 @@ Http::shutdown() $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), new Document([ 'onboarding' => $byMethod, ]))); - - $queueForRealtime->reset(); - $queueForRealtime - ->setProject($project) - ->setSubscribers(['console']) - ->setEvent('projects.[projectId].stages.[stageId].complete') - ->setParam('projectId', $project->getId()) - ->setParam('stageId', $method) - ->setPayload([ - 'stageId' => $method, - 'status' => ONBOARDING_STATUS_COMPLETED, - 'at' => $byMethod[$method]['at'], - 'actorType' => $actorType, - ]) - ->trigger(); } catch (Throwable) { // Missing `onboarding` attribute on upgraded installs must not break the request lifecycle. }