Logging cleanup
parent
b771df9510
commit
e9beedfcf1
|
|
@ -815,14 +815,14 @@ class AWSBuildRunner {
|
||||||
static checkStreamingShouldContinue(taskData, timestamp, readingLogs) {
|
static checkStreamingShouldContinue(taskData, timestamp, readingLogs) {
|
||||||
if ((taskData === null || taskData === void 0 ? void 0 : taskData.lastStatus) !== 'RUNNING') {
|
if ((taskData === null || taskData === void 0 ? void 0 : taskData.lastStatus) !== 'RUNNING') {
|
||||||
if (timestamp === 0) {
|
if (timestamp === 0) {
|
||||||
cloud_runner_logger_1.default.log('Cloud runner job stopped, streaming end of logs');
|
cloud_runner_logger_1.default.log('## Cloud runner job stopped, streaming end of logs');
|
||||||
timestamp = Date.now();
|
timestamp = Date.now();
|
||||||
}
|
}
|
||||||
if (timestamp !== 0 && Date.now() - timestamp < 30000) {
|
if (timestamp !== 0 && Date.now() - timestamp < 30000) {
|
||||||
cloud_runner_logger_1.default.log('Cloud runner status is not RUNNING for 30 seconds, last query for logs');
|
cloud_runner_logger_1.default.log('## Cloud runner status is not RUNNING for 30 seconds, last query for logs');
|
||||||
readingLogs = false;
|
readingLogs = false;
|
||||||
}
|
}
|
||||||
cloud_runner_logger_1.default.log(`Status of job: ${taskData.lastStatus}`);
|
cloud_runner_logger_1.default.log(`## Status of job: ${taskData.lastStatus}`);
|
||||||
}
|
}
|
||||||
return { timestamp, readingLogs };
|
return { timestamp, readingLogs };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -148,14 +148,14 @@ class AWSBuildRunner {
|
||||||
private static checkStreamingShouldContinue(taskData: AWS.ECS.Task, timestamp: number, readingLogs: boolean) {
|
private static checkStreamingShouldContinue(taskData: AWS.ECS.Task, timestamp: number, readingLogs: boolean) {
|
||||||
if (taskData?.lastStatus !== 'RUNNING') {
|
if (taskData?.lastStatus !== 'RUNNING') {
|
||||||
if (timestamp === 0) {
|
if (timestamp === 0) {
|
||||||
CloudRunnerLogger.log('Cloud runner job stopped, streaming end of logs');
|
CloudRunnerLogger.log('## Cloud runner job stopped, streaming end of logs');
|
||||||
timestamp = Date.now();
|
timestamp = Date.now();
|
||||||
}
|
}
|
||||||
if (timestamp !== 0 && Date.now() - timestamp < 30000) {
|
if (timestamp !== 0 && Date.now() - timestamp < 30000) {
|
||||||
CloudRunnerLogger.log('Cloud runner status is not RUNNING for 30 seconds, last query for logs');
|
CloudRunnerLogger.log('## Cloud runner status is not RUNNING for 30 seconds, last query for logs');
|
||||||
readingLogs = false;
|
readingLogs = false;
|
||||||
}
|
}
|
||||||
CloudRunnerLogger.log(`Status of job: ${taskData.lastStatus}`);
|
CloudRunnerLogger.log(`## Status of job: ${taskData.lastStatus}`);
|
||||||
}
|
}
|
||||||
return { timestamp, readingLogs };
|
return { timestamp, readingLogs };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue