From 0b17a737febd96817744db6f8b0019016302888d Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Tue, 20 Dec 2022 15:42:04 +0000 Subject: [PATCH] Fix Functions Worker --- app/workers/functions.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/workers/functions.php b/app/workers/functions.php index 51af6ec780..5ae5f852d2 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -28,18 +28,18 @@ Authorization::setDefaultStatus(false); Server::setResource('execute', function () { return function ( - Func $queueForFunctions, - Database $dbForProject, Client $statsd, + Database $dbForProject, Document $project, Document $function, + Func $queueForFunctions, string $trigger, - string $data = null, - ?Document $user = null, - string $jwt = null, string $event = null, string $eventData = null, + ?Document $user = null, + string $data = null, string $executionId = null, + string $jwt = null, Connection $queueConnection, ) { $user ??= new Document(); @@ -163,8 +163,6 @@ Server::setResource('execute', function () { $execution = $dbForProject->updateDocument('executions', $executionId, $execution); - $connection = $ - /** Trigger Webhook */ $executionModel = new Execution(); $executionUpdate = new Event(Event::WEBHOOK_QUEUE_NAME, Event::WEBHOOK_CLASS_NAME, $queueConnection); @@ -315,6 +313,7 @@ $server->job() user: $user, jwt: $jwt, statsd: $statsd, + queueConnection: $queue ); break; case 'schedule': @@ -331,6 +330,7 @@ $server->job() user: null, jwt: null, statsd: $statsd, + queueConnection: $queue ); break; }