Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
RunOnFluxBot committed Oct 29, 2024
1 parent 75184af commit e3c1c3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion services/appsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -13188,13 +13188,14 @@ async function monitorNodeStatus() {
if (installedAppsRes.status !== 'success') {
throw new Error('monitorNodeStatus - Failed to get installed Apps');
}
const isNodeConfirmed = await generalService.isNodeStatusConfirmed();
const appsInstalled = installedAppsRes.data;
// eslint-disable-next-line no-restricted-syntax
for (const installedApp of appsInstalled) {
log.info(`monitorNodeStatus - Application ${installedApp.name} going to be removed from node as the node have DOS state over 100`);
log.warn(`monitorNodeStatus - Removing application ${installedApp.name} locally`);
// eslint-disable-next-line no-await-in-loop
await removeAppLocally(installedApp.name, null, true, false, false);
await removeAppLocally(installedApp.name, null, true, false, isNodeConfirmed);
log.warn(`monitorNodeStatus - Application ${installedApp.name} locally removed`);
// eslint-disable-next-line no-await-in-loop
await serviceHelper.delay(60 * 1000); // wait for 1 min between each removal
Expand Down

0 comments on commit e3c1c3b

Please sign in to comment.