MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / constructor

Method constructor

apps/coordinator/src/index.ts:615–640  ·  view source on GitHub ↗
(
    private port: number,
    private host = "0.0.0.0"
  )

Source from the content-addressed store, hash-verified

613 #delayThresholdInMs: number;
614
615 constructor(
616 private port: number,
617 private host = "0.0.0.0"
618 ) {
619 this.#httpServer = this.#createHttpServer();
620 this.#checkpointer.initialize();
621 this.#delayThresholdInMs = this.#getDelayThreshold();
622
623 if (process.env.DELAY_THRESHOLD_IN_MS) {
624 this.#delayThresholdInMs = this.#getDelayThreshold();
625 }
626
627 const io = new Server(this.#httpServer);
628 this.#prodWorkerNamespace = this.#createProdWorkerNamespace(io);
629
630 this.#platformSocket = this.#createPlatformSocket();
631
632 const connectedTasksTotal = new Gauge({
633 name: "daemon_connected_tasks_total", // don't change this without updating dashboard config
634 help: "The number of tasks currently connected.",
635 collect: () => {
636 connectedTasksTotal.set(this.#prodWorkerNamespace.namespace.sockets.size);
637 },
638 });
639 register.registerMetric(connectedTasksTotal);
640 }
641
642 #getDelayThreshold() {
643 if (!process.env.RETRY_DELAY_THRESHOLD_IN_MS) {

Callers

nothing calls this directly

Calls 6

#createHttpServerMethod · 0.95
#getDelayThresholdMethod · 0.95
#createPlatformSocketMethod · 0.95
initializeMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected