mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-22 06:29:17 -04: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:
parent
c0fe669cd8
commit
efdffca06c
2 changed files with 9 additions and 7 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue