mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2026-07-15 01:17:20 +02:00
afa683a06f
webhook instances will not listen to either worker or event log messages on the Redis pub/sub channel
33 lines
1.0 KiB
TypeScript
33 lines
1.0 KiB
TypeScript
import { Authorized, Get, RestController } from '@/decorators';
|
|
import { OrchestrationRequest } from '@/requests';
|
|
import { Service } from 'typedi';
|
|
import { OrchestrationMainService } from '@/services/orchestration/main/orchestration.main.service';
|
|
|
|
@Authorized(['global', 'owner'])
|
|
@RestController('/orchestration')
|
|
@Service()
|
|
export class OrchestrationController {
|
|
constructor(private readonly orchestrationService: OrchestrationMainService) {}
|
|
|
|
/**
|
|
* These endpoint currently do not return anything, they just trigger the messsage to
|
|
* the workers to respond on Redis with their status.
|
|
* TODO: these responses need to be forwarded to and handled by the frontend
|
|
*/
|
|
@Get('/worker/status/:id')
|
|
async getWorkersStatus(req: OrchestrationRequest.Get) {
|
|
const id = req.params.id;
|
|
return this.orchestrationService.getWorkerStatus(id);
|
|
}
|
|
|
|
@Get('/worker/status')
|
|
async getWorkersStatusAll() {
|
|
return this.orchestrationService.getWorkerStatus();
|
|
}
|
|
|
|
@Get('/worker/ids')
|
|
async getWorkerIdsAll() {
|
|
return this.orchestrationService.getWorkerIds();
|
|
}
|
|
}
|