From 870cbbb019619bd7df8d490ba8116fd2efd0c672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Wed, 7 Aug 2024 15:13:24 +0000 Subject: [PATCH] Add commments --- src/Appwrite/Platform/Workers/Builds.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/Builds.php b/src/Appwrite/Platform/Workers/Builds.php index 41fdf887f5..251ccbc20e 100644 --- a/src/Appwrite/Platform/Workers/Builds.php +++ b/src/Appwrite/Platform/Workers/Builds.php @@ -443,6 +443,7 @@ class Builds extends Action deploymentId: $deployment->getId(), projectId: $project->getId(), callback: function ($logs) use (&$response, &$err, &$build, $dbForProject, $allEvents, $project) { + // If we have response or error from concurrent coroutine, we already have latest logs if ($response === null && $err === null) { $build = $dbForProject->getDocument('builds', $build->getId()); @@ -541,7 +542,7 @@ class Builds extends Action $build->setAttribute('endTime', $endTime); $build->setAttribute('duration', \intval(\ceil($durationEnd - $durationStart))); $build->setAttribute('status', 'failed'); - $build->setAttribute('logs', $th->getMessage() . "\n" . $th->getFile() . ':' . $th->getLine() . "\n" . $th->getTraceAsString()); + $build->setAttribute('logs', $th->getMessage()); if ($isVcsEnabled) { $this->runGitAction('failed', $github, $providerCommitHash, $owner, $repositoryName, $project, $function, $deployment->getId(), $dbForProject, $dbForConsole);