tasks: fix progress percents
mostly rebalancing the percents
This commit is contained in:
+3
-1
@@ -332,7 +332,7 @@ async function syncDnsRecords(options, progressCallback) {
|
||||
// we sync by domain only to get some nice progress
|
||||
for (const domain of allDomains) {
|
||||
progressCallback({ percent: progress, message: `Updating DNS of ${domain.domain}`});
|
||||
progress += Math.round(100/(1+allDomains.length));
|
||||
progress = Math.min(progress + Math.round(90 / (1 + allDomains.length)), 95);
|
||||
|
||||
let locations = [];
|
||||
if (domain.domain === dashboardLocation.domain) locations.push({ subdomain: dashboardLocation.subdomain, domain: dashboardLocation.domain });
|
||||
@@ -355,6 +355,8 @@ async function syncDnsRecords(options, progressCallback) {
|
||||
}
|
||||
}
|
||||
|
||||
progressCallback({ percent: 100, message: 'Done' });
|
||||
|
||||
return { errors };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user