Commit 8aee42aa authored by nanahira's avatar nanahira

fix

parent a017b5da
Pipeline #329 passed with stages
in 8 minutes and 33 seconds
...@@ -74,7 +74,7 @@ class Checker { ...@@ -74,7 +74,7 @@ class Checker {
console.log(`${this.id} => ${msg}`); console.log(`${this.id} => ${msg}`);
} }
async getRecords(): Promise<DomainRecordInfo[]> { async getRecords(): Promise<DomainRecordInfo[]> {
console.log(`Fetching domain records of ${config.domain}.`) this.message(`Fetching domain records of ${config.domain}.`)
const res: DomainRecordInfo[] = []; const res: DomainRecordInfo[] = [];
for (let i = 1; ; ++i) { for (let i = 1; ; ++i) {
const ret: DomainRecordReturnResult = await this.client.request("DescribeDomainRecords", { const ret: DomainRecordReturnResult = await this.client.request("DescribeDomainRecords", {
...@@ -82,7 +82,7 @@ class Checker { ...@@ -82,7 +82,7 @@ class Checker {
PageNumber: i, PageNumber: i,
PageSize: 500, PageSize: 500,
}, requestOption); }, requestOption);
console.log(ret.TotalCount); //this.message(`${ret.TotalCount} records found.`);
if (!ret.DomainRecords.Record.length) { if (!ret.DomainRecords.Record.length) {
break; break;
} }
...@@ -96,7 +96,7 @@ class Checker { ...@@ -96,7 +96,7 @@ class Checker {
}); });
})) { })) {
const port = _.find(config.cdnRecords, r => record.RR.match(r.match)).port; const port = _.find(config.cdnRecords, r => record.RR.match(r.match)).port;
console.log(`Found record ${record.RR}.${config.domain} => ${record.Value}:${port}.`); this.message(`Found record ${record.RR}.${config.domain} => ${record.Value}:${port}.`);
res.push({record, port}); res.push({record, port});
} }
} }
...@@ -122,7 +122,7 @@ class Checker { ...@@ -122,7 +122,7 @@ class Checker {
this.message(`Node ${address}:${port} Failed in checking ${currentTestDomain} ${i}: ${e.toString()}`); this.message(`Node ${address}:${port} Failed in checking ${currentTestDomain} ${i}: ${e.toString()}`);
} }
} }
console.log(`Node ${address}:${port} is bad.`); this.message(`Node ${address}:${port} is bad.`);
return false; return false;
} }
async checkRecord(recordInfo: DomainRecordInfo) { async checkRecord(recordInfo: DomainRecordInfo) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment