diff --git a/packages/@n8n/task-runner/src/healthcheck-server.ts b/packages/@n8n/task-runner/src/health-check-server.ts similarity index 88% rename from packages/@n8n/task-runner/src/healthcheck-server.ts rename to packages/@n8n/task-runner/src/health-check-server.ts index c6d8965a86..9cb4cae6a0 100644 --- a/packages/@n8n/task-runner/src/healthcheck-server.ts +++ b/packages/@n8n/task-runner/src/health-check-server.ts @@ -1,7 +1,7 @@ import { ApplicationError } from 'n8n-workflow'; import { createServer } from 'node:http'; -export class HealthcheckServer { +export class HealthCheckServer { private server = createServer((_, res) => { res.writeHead(200); res.end('OK'); @@ -21,7 +21,7 @@ export class HealthcheckServer { this.server.listen(port, host, () => { this.server.removeListener('error', portInUseErrorHandler); - console.log(`Healthcheck server listening on ${host}, port ${port}`); + console.log(`Health check server listening on ${host}, port ${port}`); resolve(); }); }); diff --git a/packages/@n8n/task-runner/src/start.ts b/packages/@n8n/task-runner/src/start.ts index a419699204..84226449be 100644 --- a/packages/@n8n/task-runner/src/start.ts +++ b/packages/@n8n/task-runner/src/start.ts @@ -3,10 +3,10 @@ import Container from 'typedi'; import { MainConfig } from './config/main-config'; import type { ErrorReporter } from './error-reporter'; -import type { HealthcheckServer } from './healthcheck-server'; +import type { HealthCheckServer } from './health-check-server'; import { JsTaskRunner } from './js-task-runner/js-task-runner'; -let healthcheckServer: HealthcheckServer | undefined; +let healthCheckServer: HealthCheckServer | undefined; let runner: JsTaskRunner | undefined; let isShuttingDown = false; let errorReporter: ErrorReporter | undefined; @@ -29,7 +29,7 @@ function createSignalHandler(signal: string, timeoutInS = 10) { if (runner) { await runner.stop(); runner = undefined; - void healthcheckServer?.stop(); + void healthCheckServer?.stop(); } if (errorReporter) { @@ -68,9 +68,9 @@ void (async function start() { const { enabled, host, port } = config.baseRunnerConfig.healthcheckServer; if (enabled) { - const { HealthcheckServer } = await import('./healthcheck-server'); - healthcheckServer = new HealthcheckServer(); - await healthcheckServer.start(host, port); + const { HealthCheckServer } = await import('./health-check-server'); + healthCheckServer = new HealthCheckServer(); + await healthCheckServer.start(host, port); } process.on('SIGINT', createSignalHandler('SIGINT'));