@beastmode-develeap/beastmode 0.1.160 → 0.1.162
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/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/dist/web/board.html +1 -1
- package/dist/web/build-commit.txt +1 -1
- package/dist/web/build-stamp.txt +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4972,6 +4972,8 @@ function getBoardRoutes(factoryDir) {
|
|
|
4972
4972
|
}
|
|
4973
4973
|
let busySlots = 0;
|
|
4974
4974
|
let totalSlots = 3;
|
|
4975
|
+
let shortPhaseReserve;
|
|
4976
|
+
let slotsTimestamp;
|
|
4975
4977
|
const slotsPath = join13(factoryDir, "daemon", "logs", ".slots.json");
|
|
4976
4978
|
let usedDaemonSlotsFile = false;
|
|
4977
4979
|
if (existsSync15(slotsPath)) {
|
|
@@ -4982,6 +4984,12 @@ function getBoardRoutes(factoryDir) {
|
|
|
4982
4984
|
totalSlots = slots.total;
|
|
4983
4985
|
usedDaemonSlotsFile = true;
|
|
4984
4986
|
}
|
|
4987
|
+
if (typeof slots.short_phase_reserve === "number") {
|
|
4988
|
+
shortPhaseReserve = slots.short_phase_reserve;
|
|
4989
|
+
}
|
|
4990
|
+
if (typeof slots.timestamp === "number") {
|
|
4991
|
+
slotsTimestamp = slots.timestamp;
|
|
4992
|
+
}
|
|
4985
4993
|
} catch {
|
|
4986
4994
|
}
|
|
4987
4995
|
}
|
|
@@ -5001,12 +5009,20 @@ function getBoardRoutes(factoryDir) {
|
|
|
5001
5009
|
const config = JSON.parse(readFileSync12(configPath, "utf-8"));
|
|
5002
5010
|
if (typeof config.max_slots === "number") {
|
|
5003
5011
|
totalSlots = config.max_slots;
|
|
5012
|
+
}
|
|
5013
|
+
if (shortPhaseReserve === void 0 && typeof config.short_phase_reserve === "number") {
|
|
5014
|
+
shortPhaseReserve = config.short_phase_reserve;
|
|
5015
|
+
}
|
|
5016
|
+
if (typeof config.max_slots === "number") {
|
|
5004
5017
|
break;
|
|
5005
5018
|
}
|
|
5006
5019
|
} catch {
|
|
5007
5020
|
}
|
|
5008
5021
|
}
|
|
5009
5022
|
}
|
|
5023
|
+
if (shortPhaseReserve === void 0) {
|
|
5024
|
+
shortPhaseReserve = Math.max(0, Math.min(1, totalSlots - 1));
|
|
5025
|
+
}
|
|
5010
5026
|
const alertsPath = join13(factoryDir, "daemon", "logs", ".alerts.json");
|
|
5011
5027
|
let alerts = [];
|
|
5012
5028
|
if (existsSync15(alertsPath)) {
|
|
@@ -5022,7 +5038,9 @@ function getBoardRoutes(factoryDir) {
|
|
|
5022
5038
|
slots: {
|
|
5023
5039
|
total: totalSlots,
|
|
5024
5040
|
busy: Math.min(busySlots, totalSlots),
|
|
5025
|
-
free: Math.max(totalSlots - busySlots, 0)
|
|
5041
|
+
free: Math.max(totalSlots - busySlots, 0),
|
|
5042
|
+
short_phase_reserve: shortPhaseReserve,
|
|
5043
|
+
...slotsTimestamp !== void 0 ? { timestamp: slotsTimestamp } : {}
|
|
5026
5044
|
},
|
|
5027
5045
|
alerts
|
|
5028
5046
|
};
|