mirror of
				https://github.com/louislam/uptime-kuma.git
				synced 2025-10-31 03:19:20 +08:00 
			
		
		
		
	More info in server logs
This commit is contained in:
		| @@ -48,8 +48,6 @@ class Monitor extends BeanModel { | ||||
|         let previousBeat = null; | ||||
|  | ||||
|         const beat = async () => { | ||||
|             console.log(`Monitor ${this.id}: Heartbeat`) | ||||
|  | ||||
|             if (! previousBeat) { | ||||
|                 previousBeat = await R.findOne("heartbeat", " monitor_id = ? ORDER BY time DESC", [ | ||||
|                     this.id | ||||
| @@ -145,6 +143,12 @@ class Monitor extends BeanModel { | ||||
|                 bean.important = false; | ||||
|             } | ||||
|  | ||||
|             if (bean.status === 1) { | ||||
|                 console.info(`Monitor #${this.id} '${this.name}': Successful Response: ${bean.ping} ms | Interval: ${this.interval} seconds | Type: ${this.type}`) | ||||
|             } else { | ||||
|                 console.warn(`Monitor #${this.id} '${this.name}': Failing: ${bean.msg} | Type: ${this.type}`) | ||||
|             } | ||||
|  | ||||
|             io.to(this.user_id).emit("heartbeat", bean.toJSON()); | ||||
|  | ||||
|             await R.store(bean) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user