Skip to content

Commit ff0154d

Browse files
committed
option to disable workload api
1 parent b0bee1d commit ff0154d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

apps/supervisor/src/index.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,17 @@ class ManagedSupervisor {
246246
async start() {
247247
this.logger.log("[ManagedWorker] Starting up");
248248

249-
await this.workloadServer.start();
249+
if (env.TRIGGER_WORKLOAD_API_ENABLED) {
250+
this.logger.log("[ManagedWorker] Workload API enabled", {
251+
protocol: env.TRIGGER_WORKLOAD_API_PROTOCOL,
252+
domain: env.TRIGGER_WORKLOAD_API_DOMAIN,
253+
port: env.TRIGGER_WORKLOAD_API_PORT_INTERNAL,
254+
});
255+
await this.workloadServer.start();
256+
} else {
257+
this.logger.warn("[ManagedWorker] Workload API disabled");
258+
}
259+
250260
await this.workerSession.start();
251261

252262
await this.httpServer.start();

0 commit comments

Comments
 (0)