From c20d46fef38b8ba49957dfc328ef5c70118a6726 Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Wed, 14 Sep 2022 09:40:51 -0400 Subject: [PATCH 1/3] Update README-CN.md --- README-CN.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README-CN.md b/README-CN.md index 5d94505df..b8b937add 100644 --- a/README-CN.md +++ b/README-CN.md @@ -18,6 +18,8 @@ [English](README.md) | 简体中文 +[**我们发布了 Appwrite 1.0 版本!**](https://appwrite.io/1.0) + Appwrite是一个基于Docker的端到端开发者平台,其容器化的微服务库可应用于网页端,移动端,以及后端。Appwrite 通过视觉化界面极简了从零编写 API 的繁琐过程,在保证软件安全的前提下为开发者创造了一个高效的开发环境。 Appwrite 可以提供给开发者用户验证,外部授权,用户数据读写检索,文件储存,图像处理,云函数计算,[等多种服务](https://appwrite.io/docs). From 719aa67afaa9c3da529d8b85f98143e7d4d1fd25 Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Fri, 21 Oct 2022 14:37:28 -0700 Subject: [PATCH 2/3] Remove PDO rethrow The PDOException was rethrown in general.php so that it could be caught in the catch block of http.php. However, [a change in utopia-php/framework](https://github.com/utopia-php/framework/commit/9d37326851f65f354344cfe2e3c1a282d5231025) caused the exception to be masked as an Exception rather than the underlying PDOException. As such, the `$th instanceof PDOException` in http.php is always false and `$db = null` is never executed. Since these snippets of code aren't doing anything or adding value, they should be removed. In addition, the `$db = null` may have been added to ensure the connection was added back to the pool and/or reset if needed, but it seems like that's not a problem anymore. --- app/controllers/general.php | 5 ----- app/http.php | 7 ------- 2 files changed, 12 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index e56357869..fd7599595 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -403,11 +403,6 @@ App::error() $version = App::getEnv('_APP_VERSION', 'UNKNOWN'); $route = $utopia->match($request); - /** Delegate PDO exceptions to the global handler so the database connection can be returned to the pool */ - if ($error instanceof PDOException) { - throw $error; - } - if ($logger) { if ($error->getCode() >= 500 || $error->getCode() === 0) { try { diff --git a/app/http.php b/app/http.php index fe0778bb1..4d15cab30 100644 --- a/app/http.php +++ b/app/http.php @@ -317,13 +317,6 @@ $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swo Console::error('[Error] File: ' . $th->getFile()); Console::error('[Error] Line: ' . $th->getLine()); - /** - * Reset Database connection if PDOException was thrown. - */ - if ($th instanceof PDOException) { - $db = null; - } - $swooleResponse->setStatusCode(500); $output = ((App::isDevelopment())) ? [ From 983f885b3f7ddf3f3133e0cc4b0d2d0eaf0716b7 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Mon, 31 Oct 2022 12:47:41 +0100 Subject: [PATCH 3/3] fix: builds worker buildTime --- app/workers/builds.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/workers/builds.php b/app/workers/builds.php index f31db88ab..5f33ed401 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -183,7 +183,6 @@ class BuildsV1 extends Worker /* Also update the deployment buildTime */ $deployment->setAttribute('buildTime', $response['duration']); - $deployment = $dbForProject->updateDocument('deployments', $deployment->getId(), $deployment); Console::success("Build id: $buildId created");