feat: Separate task runner server from main http server (no-changelog) (#11062)

This commit is contained in:
Tomi Turtiainen
2024-10-02 16:38:42 +03:00
committed by GitHub
parent 8d9eb162ae
commit 4546649c61
11 changed files with 239 additions and 65 deletions

View File

@@ -31,7 +31,6 @@ import { isApiEnabled, loadPublicApiVersions } from '@/public-api';
import { setupPushServer, setupPushHandler, Push } from '@/push';
import type { APIRequest } from '@/requests';
import * as ResponseHelper from '@/response-helper';
import { setupRunnerServer, setupRunnerHandler } from '@/runners/runner-ws-server';
import type { FrontendService } from '@/services/frontend.service';
import { OrchestrationService } from '@/services/orchestration.service';
@@ -202,10 +201,6 @@ export class Server extends AbstractServer {
const { restEndpoint, app } = this;
setupPushHandler(restEndpoint, app);
if (!this.globalConfig.taskRunners.disabled) {
setupRunnerHandler(restEndpoint, app);
}
const push = Container.get(Push);
if (push.isBidirectional) {
const { CollaborationService } = await import('@/collaboration/collaboration.service');
@@ -405,9 +400,4 @@ export class Server extends AbstractServer {
const { restEndpoint, server, app } = this;
setupPushServer(restEndpoint, server, app);
}
protected setupRunnerServer(): void {
const { restEndpoint, server, app } = this;
setupRunnerServer(restEndpoint, server, app);
}
}