From fdd413a4b399afd6560ff8fea79f46a574a9f717 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 26 Jan 2021 21:16:03 +0200 Subject: [PATCH] Removed not working co-runs --- app/workers/functions.php | 12 +++--------- src/Appwrite/Database/Database.php | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/app/workers/functions.php b/app/workers/functions.php index 82b27754bb..3265a1c51d 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -184,9 +184,7 @@ class FunctionsV1 Console::success('Triggered function: '.$event); - Swoole\Coroutine\run(function () use ($projectId, $database, $function, $event, $payload) { - $this->execute('event', $projectId, '', $database, $function, $event, $payload); - }); + $this->execute('event', $projectId, '', $database, $function, $event, $payload); } } break; @@ -242,9 +240,7 @@ class FunctionsV1 'scheduleOriginal' => $function->getAttribute('schedule', ''), ]); // Async task rescheduale - Swoole\Coroutine\run(function () use ($trigger, $projectId, $executionId, $database, $function) { - $this->execute($trigger, $projectId, $executionId, $database, $function); - }); + $this->execute($trigger, $projectId, $executionId, $database, $function); break; @@ -257,9 +253,7 @@ class FunctionsV1 throw new Exception('Function not found ('.$functionId.')'); } - Swoole\Coroutine\run(function () use ($trigger, $projectId, $executionId, $database, $function) { - $this->execute($trigger, $projectId, $executionId, $database, $function); - }); + $this->execute($trigger, $projectId, $executionId, $database, $function); break; default: diff --git a/src/Appwrite/Database/Database.php b/src/Appwrite/Database/Database.php index 8610aeac16..c2297fd394 100644 --- a/src/Appwrite/Database/Database.php +++ b/src/Appwrite/Database/Database.php @@ -214,7 +214,7 @@ class Database /** * @param array $data * - * @return Document|bool + * @return Document * * @throws AuthorizationException * @throws StructureException