feat: implement notification system and backoff strategy for rTorrent polling

This commit is contained in:
spinline
2026-02-05 18:31:42 +03:00
parent 97086bf33a
commit e2a8e17eae
7 changed files with 158 additions and 11 deletions

View File

@@ -36,6 +36,21 @@ pub enum AppEvent {
},
Update(TorrentUpdate),
Stats(GlobalStats),
Notification(SystemNotification),
}
#[derive(Debug, Serialize, Deserialize, Clone, ToSchema)]
pub struct SystemNotification {
pub level: NotificationLevel,
pub message: String,
}
#[derive(Debug, Serialize, Deserialize, Clone, ToSchema, PartialEq, Eq)]
pub enum NotificationLevel {
Info,
Success,
Warning,
Error,
}
#[derive(Debug, Serialize, Deserialize, Clone, ToSchema, Default)]