Skip to content

Commit

Permalink
Enhance server monitor functionality by adding serverMonitorResponse …
Browse files Browse the repository at this point in the history
…handling and improving hostname resolution
  • Loading branch information
simlarsen committed Dec 20, 2024
1 parent 32ffdf9 commit c8a966a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions Common/Server/Utils/Monitor/MonitorResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ export default class MonitorResourceUtil {
logger.debug(
`${dataToProcess.monitorId.toString()} - Processing monitor step...`,
);

response = await MonitorResourceUtil.processMonitorStep({
dataToProcess: dataToProcess,
monitorStep: monitorStep,
Expand Down
2 changes: 1 addition & 1 deletion InfrastructureAgent/build-msi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ for i in "${!BINARIES[@]}"; do
ARCH="${ARCHES[$i]}"
WXS_INPUT_FILE="./windows/app-$ARCH-template.wxs"
WXS_OUTPUT_FILE="./windows/app-$ARCH.wxs"
MSI_FILE="$OUTPUT_DIR/$APP_NAME-$APP_VERSION-$ARCH.msi"
MSI_FILE="$OUTPUT_DIR/$APP_NAME-$ARCH.msi"

# log binary and arch
echo "Building MSI for binary: $BINARY and arch: $ARCH"
Expand Down
5 changes: 3 additions & 2 deletions Worker/Jobs/ServerMonitor/CheckOnlineStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ RunCron(
monitorSteps: true,
serverMonitorRequestReceivedAt: true,
createdAt: true,
serverMonitorResponse: true,
},
limit: LIMIT_MAX,
skip: 0,
Expand All @@ -53,8 +54,8 @@ RunCron(
monitorId: monitor.id!,
onlyCheckRequestReceivedAt: true,
requestReceivedAt:
monitor.serverMonitorRequestReceivedAt || monitor.createdAt!,
hostname: "",
monitor.serverMonitorRequestReceivedAt || monitor.serverMonitorResponse?.requestReceivedAt || monitor.createdAt!,
hostname: monitor.serverMonitorResponse?.hostname || "",
};

await MonitorResourceUtil.monitorResource(serverMonitorResponse);
Expand Down

0 comments on commit c8a966a

Please sign in to comment.