Include log chunk when task runner sees log update, clarify if we can pull logs from same line or next line

This commit is contained in:
Frostebite 2023-09-25 18:04:33 +01:00
parent 5631a3b301
commit f563b8c810
3 changed files with 2 additions and 3 deletions

BIN
dist/index.js generated vendored

Binary file not shown.

BIN
dist/index.js.map generated vendored

Binary file not shown.

View File

@ -47,11 +47,10 @@ class KubernetesTaskRunner {
CloudRunnerLogger.log(`Loghash found`); CloudRunnerLogger.log(`Loghash found`);
} }
if (chunk.includes(`LOGS:`)) { if (chunk.includes(`LOGS:`)) {
const result = RemoteClientLogger.HandleLogChunkLine(chunk);
// remove "LOGS: " and decode base64 remaining // remove "LOGS: " and decode base64 remaining
const unpacked = Buffer.from(chunk.split(`LOGS: `)[1], 'base64').toString('ascii'); const unpacked = Buffer.from(chunk.split(`LOGS: `)[1], 'base64').toString('ascii');
CloudRunnerLogger.log(`Logs found HandleLogChunkLineResult:${result}\n${unpacked}`); const result = RemoteClientLogger.HandleLogChunkLine(unpacked);
CloudRunnerLogger.log(`Logs found HandleLogChunkLineResult:${result}`);
} }
} }
}; };