feat: memory alerts with top-memory process, top offender in alerts, scheduled status reports

This commit is contained in:
snowy-yang committed 2026-09-12 20:06:31 +08:00
1 parent e61142399a
commit f26f34cb87
8 files changed
+169 -37

No files matched your search

+4 -1
View File
@@ -6,7 +6,7 @@ from pathlib import Path
import monitor
import templates
from alerter import Alerter
from alerter import Alerter, Reporter
from onebot import OneBotServer
from updater import Updater
@@ -205,6 +205,8 @@ class Bot:
await self.ob.start(self.on_event)
alerter = Alerter(self.ob, self.cfg.get("alert", {}))
alerter.start()
reporter = Reporter(self.ob, self.cfg.get("report", {}))
reporter.start()
updater = Updater(self.ob, self.cfg.get("update", {}))
if self.cfg.get("update", {}).get("enabled", False):
updater.start()
@@ -217,6 +219,7 @@ class Bot:
finally:
watcher.cancel()
await updater.stop()
await reporter.stop()
await alerter.stop()
await self.ob.stop()