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