mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 23:04:04 +00:00
Avoid Uptime Kuma getting stop if one monitor is gone wrong
This commit is contained in:
parent
6437b9afab
commit
344fd52501
1 changed files with 5 additions and 1 deletions
|
@ -1803,7 +1803,11 @@ async function startMonitors() {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let monitor of list) {
|
for (let monitor of list) {
|
||||||
await monitor.start(io);
|
try {
|
||||||
|
await monitor.start(io);
|
||||||
|
} catch (e) {
|
||||||
|
log.error("monitor", e);
|
||||||
|
}
|
||||||
// Give some delays, so all monitors won't make request at the same moment when just start the server.
|
// Give some delays, so all monitors won't make request at the same moment when just start the server.
|
||||||
await sleep(getRandomInt(300, 1000));
|
await sleep(getRandomInt(300, 1000));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue