Parallelize extensions auto-update + add a toast
This commit is contained in:
parent
59e558fba5
commit
4f7523b896
|
@ -846,12 +846,15 @@ async function checkForExtensionUpdates(force) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function autoUpdateExtensions() {
|
async function autoUpdateExtensions() {
|
||||||
|
toastr.info('Auto-updating extensions. This may take several minutes.', 'Please wait...', { timeOut: 10000, extendedTimeOut: 20000 });
|
||||||
|
const promises = [];
|
||||||
for (const [id, manifest] of Object.entries(manifests)) {
|
for (const [id, manifest] of Object.entries(manifests)) {
|
||||||
if (manifest.auto_update && id.startsWith('third-party')) {
|
if (manifest.auto_update && id.startsWith('third-party')) {
|
||||||
console.debug(`Auto-updating 3rd-party extension: ${manifest.display_name} (${id})`);
|
console.debug(`Auto-updating 3rd-party extension: ${manifest.display_name} (${id})`);
|
||||||
await updateExtension(id.replace('third-party', ''), true);
|
promises.push(updateExtension(id.replace('third-party', ''), true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
await Promise.allSettled(promises);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue