fixes
parent
75e57ee600
commit
7db923218a
|
@ -3762,14 +3762,15 @@ class KubernetesTaskRunner {
|
||||||
const dateString = `${chunk.toString().split(`Z `)[0]}Z`;
|
const dateString = `${chunk.toString().split(`Z `)[0]}Z`;
|
||||||
const newDate = Date.parse(dateString);
|
const newDate = Date.parse(dateString);
|
||||||
new Date(newDate).toISOString();
|
new Date(newDate).toISOString();
|
||||||
if (KubernetesTaskRunner.lastReceivedTimestamp < newDate) {
|
const message = cloud_runner_1.default.buildParameters.cloudRunnerDebug ? chunk : chunk.split(`Z `)[1];
|
||||||
|
if (message !== KubernetesTaskRunner.lastReceivedMessage &&
|
||||||
|
KubernetesTaskRunner.lastReceivedTimestamp < newDate) {
|
||||||
started = true;
|
started = true;
|
||||||
}
|
}
|
||||||
if (!started) {
|
if (!started) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
KubernetesTaskRunner.lastReceivedTimestamp = newDate;
|
KubernetesTaskRunner.lastReceivedTimestamp = newDate;
|
||||||
const message = cloud_runner_1.default.buildParameters.cloudRunnerDebug ? chunk : chunk.split(`Z `)[1];
|
|
||||||
({ shouldReadLogs, shouldCleanup, output } = follow_log_stream_service_1.FollowLogStreamService.handleIteration(message, shouldReadLogs, shouldCleanup, output));
|
({ shouldReadLogs, shouldCleanup, output } = follow_log_stream_service_1.FollowLogStreamService.handleIteration(message, shouldReadLogs, shouldCleanup, output));
|
||||||
}
|
}
|
||||||
if (!didStreamAnyLogs) {
|
if (!didStreamAnyLogs) {
|
||||||
|
@ -3833,6 +3834,7 @@ class KubernetesTaskRunner {
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
KubernetesTaskRunner.lastReceivedMessage = ``;
|
||||||
exports["default"] = KubernetesTaskRunner;
|
exports["default"] = KubernetesTaskRunner;
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -8,6 +8,7 @@ import CloudRunner from '../../cloud-runner';
|
||||||
|
|
||||||
class KubernetesTaskRunner {
|
class KubernetesTaskRunner {
|
||||||
static lastReceivedTimestamp: number;
|
static lastReceivedTimestamp: number;
|
||||||
|
static lastReceivedMessage: string = ``;
|
||||||
static async runTask(
|
static async runTask(
|
||||||
kubeConfig: KubeConfig,
|
kubeConfig: KubeConfig,
|
||||||
kubeClient: CoreV1Api,
|
kubeClient: CoreV1Api,
|
||||||
|
@ -44,14 +45,17 @@ class KubernetesTaskRunner {
|
||||||
const dateString = `${chunk.toString().split(`Z `)[0]}Z`;
|
const dateString = `${chunk.toString().split(`Z `)[0]}Z`;
|
||||||
const newDate = Date.parse(dateString);
|
const newDate = Date.parse(dateString);
|
||||||
new Date(newDate).toISOString();
|
new Date(newDate).toISOString();
|
||||||
if (KubernetesTaskRunner.lastReceivedTimestamp < newDate) {
|
const message = CloudRunner.buildParameters.cloudRunnerDebug ? chunk : chunk.split(`Z `)[1];
|
||||||
|
if (
|
||||||
|
message !== KubernetesTaskRunner.lastReceivedMessage &&
|
||||||
|
KubernetesTaskRunner.lastReceivedTimestamp < newDate
|
||||||
|
) {
|
||||||
started = true;
|
started = true;
|
||||||
}
|
}
|
||||||
if (!started) {
|
if (!started) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
KubernetesTaskRunner.lastReceivedTimestamp = newDate;
|
KubernetesTaskRunner.lastReceivedTimestamp = newDate;
|
||||||
const message = CloudRunner.buildParameters.cloudRunnerDebug ? chunk : chunk.split(`Z `)[1];
|
|
||||||
({ shouldReadLogs, shouldCleanup, output } = FollowLogStreamService.handleIteration(
|
({ shouldReadLogs, shouldCleanup, output } = FollowLogStreamService.handleIteration(
|
||||||
message,
|
message,
|
||||||
shouldReadLogs,
|
shouldReadLogs,
|
||||||
|
|
Loading…
Reference in New Issue