import { Post, RestController, GlobalScope } from '@n8n/decorators'; import { License } from '@/license'; import { WorkerStatusService } from '@/scaling/worker-status.service.ee'; @RestController('/orchestration') export class OrchestrationController { constructor( private readonly licenseService: License, private readonly workerStatusService: WorkerStatusService, ) {} /** * This endpoint does not return anything, it just triggers the message to * the workers to respond on Redis with their status. */ @GlobalScope('orchestration:read') @Post('/worker/status') async getWorkersStatusAll() { if (!this.licenseService.isWorkerViewLicensed()) return; return await this.workerStatusService.requestWorkerStatus(); } }