mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-04-19 00:26:53 +00:00
Merge pull request #2360 from balena-os/memory-improvements
Memory usage improvements
This commit is contained in:
commit
b31cbf0db8
13
package-lock.json
generated
13
package-lock.json
generated
@ -46,7 +46,7 @@
|
||||
"balena-auth": "^6.0.1",
|
||||
"balena-register-device": "^9.0.2",
|
||||
"balena-request": "^13.3.1",
|
||||
"blinking": "^0.0.8",
|
||||
"blinking": "^1.0.1",
|
||||
"bluebird": "^3.7.2",
|
||||
"chai": "^4.3.4",
|
||||
"chai-as-promised": "^7.1.1",
|
||||
@ -3069,13 +3069,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/blinking": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/blinking/-/blinking-0.0.8.tgz",
|
||||
"integrity": "sha512-eQMWYzX6EP+FSKpmOVN4Z47vZGcBrstAszrIVG5WExDDZneicaEz3kBNfARI7FcZ+pxIrbRx2bkh7bR6HrfbqA==",
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/blinking/-/blinking-1.0.1.tgz",
|
||||
"integrity": "sha512-ZvZBCqUBIKA0ZEpf00nLYHyR/7ge7XMwGi3nA7RcuoA6i5fIkFr3YtQ84ExPk0Q/s4FVWVeaM3TGPSJHpTDhjA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/bluebird": "^3.5.36",
|
||||
"bluebird": "^3.7.2"
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bluebird": {
|
||||
|
@ -72,7 +72,7 @@
|
||||
"balena-auth": "^6.0.1",
|
||||
"balena-register-device": "^9.0.2",
|
||||
"balena-request": "^13.3.1",
|
||||
"blinking": "^0.0.8",
|
||||
"blinking": "^1.0.1",
|
||||
"bluebird": "^3.7.2",
|
||||
"chai": "^4.3.4",
|
||||
"chai-as-promised": "^7.1.1",
|
||||
|
@ -454,7 +454,7 @@ async function provisionOrRetry(retryDelay: number): Promise<void> {
|
||||
delay: retryDelay,
|
||||
});
|
||||
await setTimeout(retryDelay);
|
||||
return provisionOrRetry(retryDelay);
|
||||
void provisionOrRetry(retryDelay);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -174,8 +174,8 @@ const poll = async (
|
||||
const delayedLoop = async (delayBy: number) => {
|
||||
// Wait until we want to poll again
|
||||
await setTimeout(delayBy);
|
||||
// Poll again
|
||||
await poll(false, fetchErrors);
|
||||
// Poll again (use void to break recursion)
|
||||
void poll(false, fetchErrors);
|
||||
};
|
||||
|
||||
// Check if we want to skip first request and just loop again
|
||||
|
@ -267,7 +267,8 @@ export async function startReporting() {
|
||||
// Wait until we want to report again
|
||||
await setTimeout(delayBy);
|
||||
// Try to report again
|
||||
await recursivelyReport(delayBy);
|
||||
// the void is necessary to break the recursion and avoid leaks
|
||||
void recursivelyReport(delayBy);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -759,7 +759,6 @@ export function triggerApplyTarget({
|
||||
scheduledApply = null;
|
||||
}
|
||||
});
|
||||
return null;
|
||||
}
|
||||
|
||||
export async function applyIntermediateTarget(
|
||||
|
@ -88,6 +88,6 @@ export async function loadBackupFromMigration(
|
||||
log.error(`Error restoring migration backup, retrying: ${err}`);
|
||||
|
||||
await setTimeout(retryDelay);
|
||||
return loadBackupFromMigration(targetState, retryDelay);
|
||||
void loadBackupFromMigration(targetState, retryDelay);
|
||||
}
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ class LogMonitor {
|
||||
}s`,
|
||||
);
|
||||
await setTimeout(wait);
|
||||
return this.start();
|
||||
void this.start();
|
||||
}
|
||||
|
||||
public isAttached(containerId: string): boolean {
|
||||
|
Loading…
x
Reference in New Issue
Block a user