mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-09-04 01:03:21 +00:00
Fix: [MariaDB] Unable to clean up heartbeat data (#5425)
Co-authored-by: GJS <homelab.api@gmail.com> Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
co-authored by
GJS
Frank Elsinga
parent
c0fe669cd8
commit
efdffca06c
+7
-5
@@ -892,11 +892,13 @@ class Database {
|
||||
AND important = 0
|
||||
AND time < ${sqlHourOffset}
|
||||
AND id NOT IN (
|
||||
SELECT id
|
||||
FROM heartbeat
|
||||
WHERE monitor_id = ?
|
||||
ORDER BY time DESC
|
||||
LIMIT ?
|
||||
SELECT id FROM ( -- written this way for Maria's support
|
||||
SELECT id
|
||||
FROM heartbeat
|
||||
WHERE monitor_id = ?
|
||||
ORDER BY time DESC
|
||||
LIMIT ?
|
||||
) AS limited_ids
|
||||
)
|
||||
`, [
|
||||
monitor.id,
|
||||
|
||||
Reference in New Issue
Block a user