fix: preserve branch follower stage intervals
This commit is contained in:
@@ -106,6 +106,7 @@ if (existing) {
|
||||
}
|
||||
|
||||
const startedAt = Date.now();
|
||||
const startedAtIso = new Date(startedAt).toISOString();
|
||||
const deadline = startedAt + timeoutSeconds * 1000;
|
||||
let polls = 0;
|
||||
let latest = await getJob();
|
||||
@@ -123,6 +124,7 @@ const failed = condition(latest, "Failed");
|
||||
const logs = await logsTail();
|
||||
const summary = parseLastJsonSummary(logs);
|
||||
const timedOut = !complete && !failed;
|
||||
const finishedAt = Date.now();
|
||||
const output = {
|
||||
ok: Boolean(complete) && !timedOut,
|
||||
completed: Boolean(complete),
|
||||
@@ -134,7 +136,9 @@ const output = {
|
||||
jobName,
|
||||
namespace,
|
||||
polls,
|
||||
elapsedMs: Date.now() - startedAt,
|
||||
elapsedMs: finishedAt - startedAt,
|
||||
startedAt: startedAtIso,
|
||||
finishedAt: new Date(finishedAt).toISOString(),
|
||||
conditionReason: complete?.reason || failed?.reason || null,
|
||||
conditionMessage: complete?.message || failed?.message || null,
|
||||
logsTail: logs || null,
|
||||
|
||||
Reference in New Issue
Block a user