mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Merge pull request #8484 from appwrite/fix-missing-build-logs
Fix: missing build logs
This commit is contained in:
commit
3da1cc69d7
1 changed files with 4 additions and 3 deletions
|
|
@ -471,8 +471,9 @@ class Builds extends Action
|
|||
$executor->getLogs(
|
||||
deploymentId: $deployment->getId(),
|
||||
projectId: $project->getId(),
|
||||
callback: function ($logs) use (&$response, &$build, $dbForProject, $allEvents, $project) {
|
||||
if ($response === null) {
|
||||
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());
|
||||
|
||||
if ($build->isEmpty()) {
|
||||
|
|
@ -575,7 +576,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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue