From 3f833b71a99ec3682fb7dea2eff6034cfffbd48d Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 19 Jan 2021 18:32:53 +0200 Subject: [PATCH] Better check + CI test --- .travis.yml | 1 + app/workers/functions.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8406222a1..13cb083f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,7 @@ install: script: - docker ps +- docker stop appwrite-maintenance - docker-compose logs appwrite - docker-compose exec appwrite doctor - docker-compose exec appwrite vars diff --git a/app/workers/functions.php b/app/workers/functions.php index 2712dc74f..22c3c22ef 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -278,8 +278,8 @@ class FunctionsV1 'time' => 0, ]); - if(false === $execution) { - throw new Exception('Failed to create execution'); + if(false === $execution || ($execution instanceof Document && $execution->isEmpty())) { + throw new Exception('Failed to create or read execution'); } Authorization::reset();