From 0ec44298b8ad64c1f440f3c6bd8b38b195b3c816 Mon Sep 17 00:00:00 2001 From: Yavor Ivanov Date: Mon, 13 Nov 2023 09:46:50 +0200 Subject: [PATCH] Attach Pool dispatcher to the project builder --- lib/build/ProjectBuilder.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/build/ProjectBuilder.js b/lib/build/ProjectBuilder.js index ad44573ac..e588ba192 100644 --- a/lib/build/ProjectBuilder.js +++ b/lib/build/ProjectBuilder.js @@ -3,6 +3,7 @@ import * as resourceFactory from "@ui5/fs/resourceFactory"; import BuildLogger from "@ui5/logger/internal/loggers/Build"; import composeProjectList from "./helpers/composeProjectList.js"; import BuildContext from "./helpers/BuildContext.js"; +import {PoolDispatcher} from "../../../node_modules/@ui5/builder/lib/lbt/utils/PoolDispatcher.js"; import prettyHrtime from "pretty-hrtime"; /** @@ -112,6 +113,8 @@ class ProjectBuilder { this._graph = graph; this._buildContext = new BuildContext(graph, taskRepository, buildConfig); + this._poolDispatcher = PoolDispatcher.getInstance(); + this._poolDispatcher.registerProjectBuilder(this); this.#log = new BuildLogger("ProjectBuilder"); } @@ -262,6 +265,7 @@ class ProjectBuilder { } finally { this._deregisterCleanupSigHooks(cleanupSigHooks); await this._executeCleanupTasks(); + await this._poolDispatcher.cleanup(this); } }