From e8dbd043ecc47c2f12080ca42cee598c1b0b1b8c Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 17 Oct 2023 07:02:54 +0300 Subject: [PATCH] addressing some comments --- src/Appwrite/Event/Database.php | 3 ++- src/Appwrite/Platform/Tasks/Schedule.php | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Event/Database.php b/src/Appwrite/Event/Database.php index 892838746b..eb22f8897f 100644 --- a/src/Appwrite/Event/Database.php +++ b/src/Appwrite/Event/Database.php @@ -18,7 +18,6 @@ class Database extends Event { parent::__construct($connection); - $this->setQueue($this->getProject()->getAttribute('database')); $this->setClass(Event::DATABASE_CLASS_NAME); } @@ -110,6 +109,8 @@ class Database extends Event public function trigger(): string|bool { + $this->setQueue($this->getProject()->getAttribute('database')); + $client = new Client($this->queue, $this->connection); return $client->enqueue([ diff --git a/src/Appwrite/Platform/Tasks/Schedule.php b/src/Appwrite/Platform/Tasks/Schedule.php index a4afdc3bdb..57c9d22c4f 100644 --- a/src/Appwrite/Platform/Tasks/Schedule.php +++ b/src/Appwrite/Platform/Tasks/Schedule.php @@ -38,8 +38,6 @@ class Schedule extends Action ->inject('dbForConsole') ->inject('getProjectDB') ->callback(fn (Group $pools, Database $dbForConsole, callable $getProjectDB) => $this->action($pools, $dbForConsole, $getProjectDB)); - - throw new Exception('error on Schedule cli'); } /**