notifications: use clearAlert to clear disk space message
This commit is contained in:
@@ -167,9 +167,12 @@ async function checkDiskSpace() {
|
||||
|
||||
debug(`checkDiskSpace: disk space checked. out of space: ${markdownMessage || 'no'}`);
|
||||
|
||||
if (markdownMessage) markdownMessage = `One or more file systems are running out of space. Please increase the disk size at the earliest.\n\n${markdownMessage}`;
|
||||
|
||||
await notifications.alert(notifications.ALERT_DISK_SPACE, 'Server is running out of disk space', markdownMessage, { persist: true });
|
||||
if (markdownMessage) {
|
||||
const finalMessage = `One or more file systems are running out of space. Please increase the disk size at the earliest.\n\n${markdownMessage}`;
|
||||
await notifications.alert(notifications.ALERT_DISK_SPACE, 'Server is running out of disk space', finalMessage, { persist: true });
|
||||
} else {
|
||||
await notifications.clearAlert(notifications.ALERT_DISK_SPACE, 'Server is running out of disk space');
|
||||
}
|
||||
}
|
||||
|
||||
async function getSwapSize() {
|
||||
|
||||
Reference in New Issue
Block a user