add note on the promiseRetry usage

This commit is contained in:
Girish Ramakrishnan
2022-01-05 12:27:03 -08:00
parent 32668b04c6
commit 235d18cbb1
+2 -2
View File
@@ -207,7 +207,7 @@ async function registerLocations(locations, options, progressCallback) {
const ip = await sysinfo.getServerIp();
for (const location of locations) {
const error = await promiseRetry({ times: 200, interval: 5000, debug }, async function () {
const error = await promiseRetry({ times: 200, interval: 5000, debug }, async function () { // returns error to abort the "retry"
progressCallback({ message: `Registering location: ${location.subdomain ? (location.subdomain + '.') : ''}${location.domain}` });
// get the current record before updating it
@@ -243,7 +243,7 @@ async function unregisterLocations(locations, progressCallback) {
const ip = await sysinfo.getServerIp();
for (const location of locations) {
const error = await promiseRetry({ times: 30, interval: 5000, debug }, async function () {
const error = await promiseRetry({ times: 30, interval: 5000, debug }, async function () { // returns error to abort the "retry"
progressCallback({ message: `Unregistering location: ${location.subdomain ? (location.subdomain + '.') : ''}${location.domain}` });
const [error] = await safe(removeDnsRecords(location.subdomain, location.domain, 'A', [ ip ]));