mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-04-15 23:16:34 +00:00
Remove image manager appUpdatePollInterval listener
This commit is contained in:
parent
a1d098d8f3
commit
77070712a4
@ -125,7 +125,6 @@ let targetVolatilePerImageId: {
|
||||
export const initialized = (async () => {
|
||||
await config.initialized;
|
||||
|
||||
await imageManager.initialized;
|
||||
await imageManager.cleanImageData();
|
||||
const cleanup = async () => {
|
||||
const containers = await docker.listContainers({ all: true });
|
||||
|
@ -152,18 +152,6 @@ function reportEvent(event: 'start' | 'update' | 'finish', state: Image) {
|
||||
}
|
||||
}
|
||||
|
||||
let appUpdatePollInterval: number;
|
||||
|
||||
export const initialized = (async () => {
|
||||
await config.initialized;
|
||||
appUpdatePollInterval = await config.get('appUpdatePollInterval');
|
||||
config.on('change', (vals) => {
|
||||
if (vals.appUpdatePollInterval != null) {
|
||||
appUpdatePollInterval = vals.appUpdatePollInterval;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
type ServiceInfo = Pick<
|
||||
Service,
|
||||
'imageName' | 'appId' | 'serviceId' | 'serviceName' | 'imageId' | 'releaseId'
|
||||
@ -187,6 +175,8 @@ export async function triggerFetch(
|
||||
onFinish = _.noop,
|
||||
serviceName: string,
|
||||
): Promise<void> {
|
||||
const appUpdatePollInterval = await config.get('appUpdatePollInterval');
|
||||
|
||||
if (imageFetchFailures[image.name] != null) {
|
||||
// If we are retrying a pull within the backoff time of the last failure,
|
||||
// we need to throw an error, which will be caught in the device-state
|
||||
|
Loading…
x
Reference in New Issue
Block a user