[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot] 2026-01-13 09:47:57 +00:00 committed by GitHub
parent d01cf6e375
commit c1919b2cba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1450,7 +1450,7 @@ class Monitor extends BeanModel {
* @param {boolean} isFirstBeat Is this the first beat of this monitor?
* @param {const} previousBeatStatus Status of the previous beat
* @param {const} currentBeatStatus Status of the current beat
* @param {number} [monitorID] Optional monitor ID to check history for PENDING->UP transitions
* @param {number} monitorID Optional monitor ID to check history for PENDING->UP transitions
* @returns {Promise<boolean>} True if is an important beat else false
*/
static async isImportantForNotification(isFirstBeat, previousBeatStatus, currentBeatStatus, monitorID = null) {
@ -1680,11 +1680,10 @@ class Monitor extends BeanModel {
* @returns {Promise<string|null>} Last non-PENDING status or null if not found
*/
static async getLastNonPendingStatus(monitorID) {
const heartbeat = await R.findOne(
"heartbeat",
" monitor_id = ? AND status != ? ORDER BY time DESC LIMIT 1",
[monitorID, PENDING]
);
const heartbeat = await R.findOne("heartbeat", " monitor_id = ? AND status != ? ORDER BY time DESC LIMIT 1", [
monitorID,
PENDING,
]);
return heartbeat?.status || null;
}