refactor: Encapsulate task runner startup to module (#11531)

This commit is contained in:
Tomi Turtiainen
2024-11-04 16:12:29 +02:00
committed by GitHub
parent d49686c6f2
commit 9355fc3578
13 changed files with 224 additions and 50 deletions

View File

@@ -68,14 +68,15 @@ export class TaskRunnerProcess extends TypedEmitter<TaskRunnerProcessEventMap> {
) {
super();
a.ok(
this.runnerConfig.mode !== 'external',
'Task Runner Process cannot be used in external mode',
);
this.logger = logger.scoped('task-runner');
}
async start() {
a.ok(
this.runnerConfig.mode === 'internal_childprocess' ||
this.runnerConfig.mode === 'internal_launcher',
);
a.ok(!this.process, 'Task Runner Process already running');
const grantToken = await this.authService.createGrantToken();