Merge pull request #1908 from balena-os/status-missing

Always add status to image download report
This commit is contained in:
bulldozer-balena[bot] 2022-03-21 23:55:28 +00:00 committed by GitHub
commit 50d6fd4452
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,7 +193,11 @@ export async function triggerFetch(
}
const onProgress = (progress: FetchProgressEvent) => {
reportEvent('update', { ...image, downloadProgress: progress.percentage });
reportEvent('update', {
...image,
downloadProgress: progress.percentage,
status: 'Downloading',
});
};
let success: boolean;
@ -261,7 +265,7 @@ export async function triggerFetch(
}
}
reportEvent('finish', image);
reportEvent('finish', { ...image, status: 'Downloaded' });
onFinish(success);
}