Compare commits

..
Author SHA1 Message Date
spinline 3bb2d68a65 perf: increase background polling interval to 60 seconds
Build MIPS Binary / build (push) Successful in 1m51s
2026-02-13 12:26:09 +03:00
spinline fe117cdaec chore: add detailed logging for web push notifications in webhook handler
Build MIPS Binary / build (push) Successful in 1m50s
2026-02-13 12:11:14 +03:00
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -33,9 +33,13 @@ pub async fn torrent_finished_handler(
let push_store = state.push_store.clone();
let title = "Torrent Tamamlandı".to_string();
let body = message;
let torrent_name = params.name.clone();
tokio::spawn(async move {
if let Err(e) = crate::push::send_push_notification(&push_store, &title, &body).await {
tracing::error!("Failed to send push notification from webhook: {}", e);
tracing::info!("Attempting to send Web Push notification for torrent: {}", torrent_name);
match crate::push::send_push_notification(&push_store, &title, &body).await {
Ok(_) => tracing::info!("Web Push notification sent successfully for: {}", torrent_name),
Err(e) => tracing::error!("Failed to send Web Push notification for {}: {:?}", torrent_name, e),
}
});
}
+1 -1
View File
@@ -314,7 +314,7 @@ async fn main() {
let loop_interval = if active_clients > 0 {
Duration::from_secs(1)
} else {
Duration::from_secs(30)
Duration::from_secs(60)
};
// 1. Fetch Torrents