rename promise-retry to retry

This commit is contained in:
Girish Ramakrishnan
2026-03-27 11:39:38 +01:00
parent b08e3a5128
commit 9c3c8cc9d1
15 changed files with 45 additions and 45 deletions
+3 -3
View File
@@ -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);
});