pull/496/head
Frostebite 2023-03-07 15:29:44 +00:00
parent 44e46f4397
commit 6bd5906a52
3 changed files with 5 additions and 3 deletions

3
dist/index.js vendored
View File

@ -4053,6 +4053,7 @@ class KubernetesTaskRunner {
try {
const dateString = `${chunk.toString().split(`Z `)[0]}Z`;
const newDate = Date.parse(dateString);
new Date(newDate).toISOString();
KubernetesTaskRunner.lastReceivedTimestamp = newDate;
}
catch (_a) {
@ -4106,7 +4107,7 @@ class KubernetesTaskRunner {
try {
// const resultError = await new Log(kubeConfig).log(namespace, podName, containerName, stream, logOptions);
const sinceTime = KubernetesTaskRunner.lastReceivedTimestamp
? `--since-time="${KubernetesTaskRunner.lastReceivedTimestamp}" `
? `--since-time="${new Date(KubernetesTaskRunner.lastReceivedTimestamp).toISOString()}" `
: ` `;
yield cloud_runner_system_1.CloudRunnerSystem.Run(`kubectl logs ${podName} -c ${containerName} --timestamps ${sinceTime}> app.log`, false, true);
const logs = yield cloud_runner_system_1.CloudRunnerSystem.Run(`cat app.log`, false, true);

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -30,6 +30,7 @@ class KubernetesTaskRunner {
try {
const dateString = `${chunk.toString().split(`Z `)[0]}Z`;
const newDate = Date.parse(dateString);
new Date(newDate).toISOString();
KubernetesTaskRunner.lastReceivedTimestamp = newDate;
} catch {
/* */
@ -91,7 +92,7 @@ class KubernetesTaskRunner {
// const resultError = await new Log(kubeConfig).log(namespace, podName, containerName, stream, logOptions);
const sinceTime = KubernetesTaskRunner.lastReceivedTimestamp
? `--since-time="${KubernetesTaskRunner.lastReceivedTimestamp}" `
? `--since-time="${new Date(KubernetesTaskRunner.lastReceivedTimestamp).toISOString()}" `
: ` `;
await CloudRunnerSystem.Run(
`kubectl logs ${podName} -c ${containerName} --timestamps ${sinceTime}> app.log`,