From e410beb9356d175c8f64e731036f254b332196c6 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 2 Nov 2016 11:06:15 +0100 Subject: [PATCH] CoreApi: skip incomplete stages fixes #13028 --- library/Director/Core/CoreApi.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/library/Director/Core/CoreApi.php b/library/Director/Core/CoreApi.php index 4027d6db..535c2607 100644 --- a/library/Director/Core/CoreApi.php +++ b/library/Director/Core/CoreApi.php @@ -501,9 +501,7 @@ constants try { $availableFiles = $this->listStageFiles($stage); } catch (Exception $e) { - // TODO: This is not correct. We might miss logs as af an ongoing reload - $deployment->set('stage_collected', 'y'); - $deployment->store(); + // Could not collect stage files. Doesn't matter, let's try next time continue; } @@ -518,6 +516,9 @@ constants $deployment->set('startup_log', $this->shortenStartupLog( $this->getStagedFile($stage, 'startup.log') )); + } else { + // Stage seems to be incomplete, let's try again next time + continue; } $deployment->set('stage_collected', 'y');