Skip to content

Commit 0b25571

Browse files
committed
disable run debug logs by default
1 parent 82e7484 commit 0b25571

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

apps/supervisor/src/env.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ const Env = z.object({
8787

8888
// Debug
8989
DEBUG: BoolEnv.default(false),
90+
SEND_RUN_DEBUG_LOGS: BoolEnv.default(false),
9091
});
9192

9293
export const env = Env.parse(stdEnv);

apps/supervisor/src/workloadServer/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
import { HttpServer, type CheckpointClient } from "@trigger.dev/core/v3/serverOnly";
2525
import { type IncomingMessage } from "node:http";
2626
import { register } from "../metrics.js";
27+
import { env } from "../env.js";
2728

2829
// Use the official export when upgrading to [email protected]
2930
interface DefaultEventsMap {
@@ -374,6 +375,10 @@ export class WorkloadServer extends EventEmitter<WorkloadServerEvents> {
374375
handler: async ({ req, reply, params, body }) => {
375376
reply.empty(204);
376377

378+
if (!env.SEND_RUN_DEBUG_LOGS) {
379+
return;
380+
}
381+
377382
await this.workerClient.sendDebugLog(
378383
params.runFriendlyId,
379384
body,

0 commit comments

Comments
 (0)