From 2b3e7f67a488bb91351b60be65d5d1e548a68fb2 Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 5 Nov 2024 12:21:16 +0200 Subject: [PATCH] Rollback cross regions connections --- app/controllers/api/functions.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 6a2ba3540c..785bccb206 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -184,8 +184,7 @@ App::post('/v1/functions') ->inject('queueForBuilds') ->inject('dbForConsole') ->inject('gitHub') - ->inject('realtimeConnection') - ->action(function (string $functionId, string $name, string $runtime, array $execute, array $events, string $schedule, int $timeout, bool $enabled, bool $logging, string $entrypoint, string $commands, array $scopes, string $installationId, string $providerRepositoryId, string $providerBranch, bool $providerSilentMode, string $providerRootDirectory, string $templateRepository, string $templateOwner, string $templateRootDirectory, string $templateVersion, string $specification, Request $request, Response $response, Database $dbForProject, Document $project, Document $user, Event $queueForEvents, Build $queueForBuilds, Database $dbForConsole, GitHub $githubgithub, Callable $realtimeConnection) use ($redeployVcs) { + ->action(function (string $functionId, string $name, string $runtime, array $execute, array $events, string $schedule, int $timeout, bool $enabled, bool $logging, string $entrypoint, string $commands, array $scopes, string $installationId, string $providerRepositoryId, string $providerBranch, bool $providerSilentMode, string $providerRootDirectory, string $templateRepository, string $templateOwner, string $templateRootDirectory, string $templateVersion, string $specification, Request $request, Response $response, Database $dbForProject, Document $project, Document $user, Event $queueForEvents, Build $queueForBuilds, Database $dbForConsole, GitHub $githubgithub) use ($redeployVcs) { $functionId = ($functionId == 'unique()') ? ID::unique() : $functionId; $allowList = \array_filter(\explode(',', System::getEnv('_APP_FUNCTIONS_RUNTIMES', ''))); @@ -376,7 +375,6 @@ App::post('/v1/functions') project: $project ); Realtime::send( - redis: $realtimeConnection($queueForEvents->getSourceRegion()), projectId: 'console', payload: $rule->getArrayCopy(), events: $allEvents, @@ -384,7 +382,6 @@ App::post('/v1/functions') roles: $target['roles'] ); Realtime::send( - redis: $realtimeConnection($queueForEvents->getSourceRegion()), projectId: $project->getId(), payload: $rule->getArrayCopy(), events: $allEvents,