Skip to content

Commit

Permalink
Fix: [MariaDB] Unable to clean up heartbeat data (#5425)
Browse files Browse the repository at this point in the history
Co-authored-by: GJS <[email protected]>
Co-authored-by: Frank Elsinga <[email protected]>
  • Loading branch information
3 people authored Dec 12, 2024
1 parent c0fe669 commit efdffca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions server/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit efdffca

Please sign in to comment.