mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-24 15:25:36 -04:00
Improve error handling of mysqlQuery and return row count as result
This commit is contained in:
parent
097567e5f0
commit
7330db3563
2 changed files with 20 additions and 13 deletions
|
@ -637,9 +637,7 @@ class Monitor extends BeanModel {
|
|||
} else if (this.type === "mysql") {
|
||||
let startTime = dayjs().valueOf();
|
||||
|
||||
await mysqlQuery(this.databaseConnectionString, this.databaseQuery);
|
||||
|
||||
bean.msg = "";
|
||||
bean.msg = await mysqlQuery(this.databaseConnectionString, this.databaseQuery);
|
||||
bean.status = UP;
|
||||
bean.ping = dayjs().valueOf() - startTime;
|
||||
} else if (this.type === "mongodb") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue