mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-09-01 02:01:19 +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:
+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