| | 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, |
| | ) {} |
| |
|
| | |
| | |
| | |
| | |
| | @GlobalScope('orchestration:read') |
| | @Post('/worker/status') |
| | async getWorkersStatusAll() { |
| | if (!this.licenseService.isWorkerViewLicensed()) return; |
| |
|
| | return await this.workerStatusService.requestWorkerStatus(); |
| | } |
| | } |
| |
|