pass debug to promise-retry

This commit is contained in:
Girish Ramakrishnan
2021-12-07 11:18:26 -08:00
parent ae0e572593
commit 013f5d359d
6 changed files with 14 additions and 19 deletions
+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 }, async function () {
const error = await promiseRetry({ times: 200, interval: 5000, debug }, async function () {
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 }, async function () {
const error = await promiseRetry({ times: 30, interval: 5000, debug }, async function () {
progressCallback({ message: `Unregistering location: ${location.subdomain ? (location.subdomain + '.') : ''}${location.domain}` });
const [error] = await safe(removeDnsRecords(location.subdomain, location.domain, 'A', [ ip ]));