@nu-art/build-and-install 0.204.43 → 0.204.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/phases/phases.js +21 -4
package/package.json
CHANGED
package/phases/phases.js
CHANGED
|
@@ -665,18 +665,35 @@ exports.Phase_Launch = {
|
|
|
665
665
|
}
|
|
666
666
|
if (pkg.type === types_1.PackageType_Python) {
|
|
667
667
|
runningAppsLogs === null || runningAppsLogs === void 0 ? void 0 : runningAppsLogs.registerApp(pkg.name, logClient);
|
|
668
|
-
logClient.log(pkg.name, ts_common_1.LogLevel.Info, true, ['Awaiting Advisor BE launch']);
|
|
668
|
+
logClient.log(pkg.name, ts_common_1.LogLevel.Info, true, ['Awaiting Advisor & KM BE launch']);
|
|
669
669
|
const advisorExecutor = executorMap['advisor-backend'];
|
|
670
|
+
const kmExecutor = executorMap['km-backend'];
|
|
670
671
|
if (!advisorExecutor)
|
|
671
|
-
logClient.log(pkg.name, ts_common_1.LogLevel.Error, true, ['Advisor executor not registered yet']);
|
|
672
|
-
|
|
673
|
-
logClient.log(pkg.name, ts_common_1.LogLevel.
|
|
672
|
+
logClient.log(pkg.name, ts_common_1.LogLevel.Error, true, ['Advisor BE executor not registered yet']);
|
|
673
|
+
if (!kmExecutor)
|
|
674
|
+
logClient.log(pkg.name, ts_common_1.LogLevel.Error, true, ['KM BE executor not registered yet']);
|
|
675
|
+
let advisorUp = false;
|
|
676
|
+
let kmUp = false;
|
|
677
|
+
const startPython = async () => {
|
|
678
|
+
logClient.log(pkg.name, ts_common_1.LogLevel.Info, true, ['Advisor & KM BE launched, Starting!']);
|
|
674
679
|
const executor = new CommandExecutor_Python_1.CommandExecutor_Python(pkg);
|
|
675
680
|
runningAppsLogs === null || runningAppsLogs === void 0 ? void 0 : runningAppsLogs.addOnTerminateCallback(async () => {
|
|
676
681
|
await executor.kill();
|
|
677
682
|
runningAppsLogs === null || runningAppsLogs === void 0 ? void 0 : runningAppsLogs.unregisterApp(pkg.name);
|
|
678
683
|
});
|
|
679
684
|
await executor.execute();
|
|
685
|
+
};
|
|
686
|
+
advisorExecutor === null || advisorExecutor === void 0 ? void 0 : advisorExecutor.addOnReadyCallback(async () => {
|
|
687
|
+
advisorUp = true;
|
|
688
|
+
if (!kmUp)
|
|
689
|
+
return logClient.log(pkg.name, ts_common_1.LogLevel.Info, true, ['Advisor launched, waiting for KM']);
|
|
690
|
+
await startPython();
|
|
691
|
+
});
|
|
692
|
+
kmExecutor === null || kmExecutor === void 0 ? void 0 : kmExecutor.addOnReadyCallback(async () => {
|
|
693
|
+
kmUp = true;
|
|
694
|
+
if (!advisorUp)
|
|
695
|
+
return logClient.log(pkg.name, ts_common_1.LogLevel.Info, true, ['KM launched, waiting for Advisor']);
|
|
696
|
+
await startPython();
|
|
680
697
|
});
|
|
681
698
|
}
|
|
682
699
|
projectScreen.updateOrCreatePackage(pkg.name, 'Died');
|