rename promise-retry to retry
This commit is contained in:
+3
-3
@@ -9,7 +9,7 @@ import ipaddr from './ipaddr.js';
|
||||
import mail from './mail.js';
|
||||
import mailServer from './mailserver.js';
|
||||
import network from './network.js';
|
||||
import promiseRetry from './promise-retry.js';
|
||||
import retry from './retry.js';
|
||||
import safe from 'safetydance';
|
||||
import tasks from './tasks.js';
|
||||
import tld from 'tldjs';
|
||||
@@ -250,7 +250,7 @@ async function registerLocations(locations, options, progressCallback) {
|
||||
for (const location of locations) {
|
||||
progressCallback({ message: `Registering location ${fqdn(location.subdomain, location.domain)}` });
|
||||
|
||||
await promiseRetry({ times: 200, interval: 5000, log, retry: (error) => error.retryable }, async function () {
|
||||
await retry({ times: 200, interval: 5000, log, retry: (error) => error.retryable }, async function () {
|
||||
// cname records cannot co-exist with other records
|
||||
const [getError, values] = await safe(getDnsRecords(location.subdomain, location.domain, 'CNAME'));
|
||||
if (!getError && values.length === 1) {
|
||||
@@ -300,7 +300,7 @@ async function unregisterLocations(locations, progressCallback) {
|
||||
for (const location of locations) {
|
||||
progressCallback({ message: `Unregistering location: ${location.subdomain ? (location.subdomain + '.') : ''}${location.domain}` });
|
||||
|
||||
await promiseRetry({ times: 30, interval: 5000, log, retry: (error) => error.retryable }, async function () {
|
||||
await retry({ times: 30, interval: 5000, log, retry: (error) => error.retryable }, async function () {
|
||||
if (ipv4) await unregisterLocation(location, 'A', ipv4);
|
||||
if (ipv6) await unregisterLocation(location, 'AAAA', ipv6);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user