porkbun: it is really slow

This commit is contained in:
Girish Ramakrishnan
2024-12-16 09:46:38 +01:00
parent 3d8ffcd0f7
commit 1d0f3a08f4
3 changed files with 9 additions and 9 deletions

View File

@@ -44,7 +44,7 @@ async function getDnsRecords(domainConfig, zoneName, name, type) {
assert.strictEqual(typeof name, 'string');
assert.strictEqual(typeof type, 'string');
debug(`get: ${name} in zone ${zoneName} of type ${type}`);
debug(`get: ${name} zone:${zoneName} type:${type}`);
const data = {
secretapikey: domainConfig.secretapikey,
@@ -100,7 +100,7 @@ async function upsert(domainObject, location, type, values) {
zoneName = domainObject.zoneName,
name = dns.getName(domainObject, location, type) || '';
debug(`upsert: ${name} in zone ${zoneName} of type ${type} with values ${JSON.stringify(values)}`);
debug(`upsert: ${name} zone:${zoneName} type:${type} values:${JSON.stringify(values)}`);
await delDnsRecords(domainConfig, zoneName, name, type);
@@ -135,7 +135,7 @@ async function upsert(domainObject, location, type, values) {
debug(`upsert: created record with id ${response.body.id}`);
await timers.setTimeout(1500); // see rate limit note at top of file
await timers.setTimeout(5000); // see rate limit note at top of file
}
}
@@ -162,7 +162,7 @@ async function del(domainObject, location, type, values) {
zoneName = domainObject.zoneName,
name = dns.getName(domainObject, location, type) || '';
debug(`del: ${name} in zone ${zoneName} of type ${type} with values ${JSON.stringify(values)}`);
debug(`del: ${name} zone ${zoneName} of type ${type} with values ${JSON.stringify(values)}`);
const data = {
secretapikey: domainConfig.secretapikey,
@@ -185,7 +185,7 @@ async function del(domainObject, location, type, values) {
if (response.statusCode !== 200) throw new BoxError(BoxError.EXTERNAL_ERROR, formatError(response));
if (response.body.status !== 'SUCCESS') throw new BoxError(BoxError.EXTERNAL_ERROR, `Invalid status in response: ${JSON.stringify(response.body)}`);
await timers.setTimeout(1500); // see rate limit note at top of file
await timers.setTimeout(5000); // see rate limit note at top of file
}
}