pull/496/head
Frostebite 2023-03-07 15:00:50 +00:00
parent 45597ae5c6
commit 44e46f4397
3 changed files with 8 additions and 6 deletions

5
dist/index.js vendored
View File

@ -4051,8 +4051,9 @@ class KubernetesTaskRunner {
stream._write = (chunk, encoding, next) => { stream._write = (chunk, encoding, next) => {
didStreamAnyLogs = true; didStreamAnyLogs = true;
try { try {
const newData = new Date(`${chunk.toString().split(`Z `)[0]}Z`); const dateString = `${chunk.toString().split(`Z `)[0]}Z`;
KubernetesTaskRunner.lastReceivedTimestamp = newData; const newDate = Date.parse(dateString);
KubernetesTaskRunner.lastReceivedTimestamp = newDate;
} }
catch (_a) { catch (_a) {
/* */ /* */

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@ import { FollowLogStreamService } from '../../services/follow-log-stream-service
import { CloudRunnerSystem } from '../../services/cloud-runner-system'; import { CloudRunnerSystem } from '../../services/cloud-runner-system';
class KubernetesTaskRunner { class KubernetesTaskRunner {
static lastReceivedTimestamp: Date; static lastReceivedTimestamp: number;
static async runTask( static async runTask(
kubeConfig: KubeConfig, kubeConfig: KubeConfig,
kubeClient: CoreV1Api, kubeClient: CoreV1Api,
@ -28,8 +28,9 @@ class KubernetesTaskRunner {
stream._write = (chunk, encoding, next) => { stream._write = (chunk, encoding, next) => {
didStreamAnyLogs = true; didStreamAnyLogs = true;
try { try {
const newData = new Date(`${chunk.toString().split(`Z `)[0]}Z`); const dateString = `${chunk.toString().split(`Z `)[0]}Z`;
KubernetesTaskRunner.lastReceivedTimestamp = newData; const newDate = Date.parse(dateString);
KubernetesTaskRunner.lastReceivedTimestamp = newDate;
} catch { } catch {
/* */ /* */
} }