Skip to content

Commit

Permalink
add static ip information to fluxapprunning
Browse files Browse the repository at this point in the history
  • Loading branch information
Cabecinha84 committed Jan 30, 2025
1 parent 23e47ac commit 438ed9b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ZelBack/src/services/appsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -3773,6 +3773,7 @@ async function registerAppLocally(appSpecs, componentSpecs, res, test = false) {
broadcastedAt,
runningSince: broadcastedAt,
osUptime: os.uptime(),
staticIp: geolocationService.isStaticIP(),
};

// store it in local database first
Expand Down Expand Up @@ -6637,6 +6638,7 @@ async function storeAppRunningMessage(message) {
broadcastedAt: new Date(message.broadcastedAt),
expireAt: new Date(validTill),
osUptime: message.osUptime,
staticIp: message.staticIp,
};

// indexes over name, hash, ip. Then name + ip and name + ip + broadcastedAt.
Expand Down Expand Up @@ -9635,6 +9637,7 @@ async function checkAndNotifyPeersOfRunningApps() {
broadcastedAt: Date.now(),
runningSince: runningOnMyNodeSince,
osUptime: os.uptime(),
staticIp: geolocationService.isStaticIP(),
};
const app = {
name: application.name,
Expand Down Expand Up @@ -9665,6 +9668,7 @@ async function checkAndNotifyPeersOfRunningApps() {
ip: myIP,
broadcastedAt: Date.now(),
osUptime: os.uptime(),
staticIp: geolocationService.isStaticIP(),
};
// eslint-disable-next-line no-await-in-loop
await fluxCommunicationMessagesSender.broadcastMessageToOutgoing(newAppRunningMessageV2);
Expand All @@ -9687,6 +9691,7 @@ async function checkAndNotifyPeersOfRunningApps() {
ip: myIP,
broadcastedAt: Date.now(),
osUptime: os.uptime(),
staticIp: geolocationService.isStaticIP(),
};
// eslint-disable-next-line no-await-in-loop
await fluxCommunicationMessagesSender.broadcastMessageToOutgoing(newAppRunningMessageV2);
Expand Down

0 comments on commit 438ed9b

Please sign in to comment.