mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-05-02 06:26:06 -04:00
Merge remote-tracking branch 'remote/master' into feature/add-xml-support-to-http-monitors
This commit is contained in:
commit
35bd129d66
20 changed files with 627 additions and 10 deletions
|
@ -668,9 +668,17 @@ class Monitor extends BeanModel {
|
|||
bean.msg = await redisPingAsync(this.databaseConnectionString);
|
||||
bean.status = UP;
|
||||
bean.ping = dayjs().valueOf() - startTime;
|
||||
|
||||
} else if (this.type in UptimeKumaServer.monitorTypeList) {
|
||||
let startTime = dayjs().valueOf();
|
||||
const monitorType = UptimeKumaServer.monitorTypeList[this.type];
|
||||
await monitorType.check(this, bean);
|
||||
if (!bean.ping) {
|
||||
bean.ping = dayjs().valueOf() - startTime;
|
||||
}
|
||||
|
||||
} else {
|
||||
bean.msg = "Unknown Monitor Type";
|
||||
bean.status = PENDING;
|
||||
throw new Error("Unknown Monitor Type");
|
||||
}
|
||||
|
||||
if (this.isUpsideDown()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue