append shortcode to restore names

This commit is contained in:
nicktrn
2024-03-20 15:15:51 +00:00
parent f21c94c0ce
commit b091347614
+2 -1
View File
@@ -7,6 +7,7 @@ import {
TaskOperationsIndexOptions,
TaskOperationsRestoreOptions,
} from "@trigger.dev/core-apps";
import { randomUUID } from "crypto";
const RUNTIME_ENV = process.env.KUBERNETES_PORT ? "kubernetes" : "local";
const NODE_NAME = process.env.NODE_NAME || "local";
@@ -232,7 +233,7 @@ class KubernetesTaskOperations implements TaskOperations {
await this.#createPod(
{
metadata: {
name: this.#getRunContainerName(opts.attemptId),
name: `${this.#getRunContainerName(opts.attemptId)}-${randomUUID().slice(0, 8)}`,
namespace: this.#namespace.metadata.name,
},
spec: {