auto-call downloader every day
Some checks failed
CI/CD Pipeline / deploy (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled

This commit is contained in:
2025-08-12 20:40:57 +02:00
parent 3d252a2604
commit b21863298b
5 changed files with 74 additions and 7 deletions

View File

@@ -25,11 +25,10 @@ impl AppState {
pub async fn check_update(self: Arc<Self>) {
let today = Local::now().date_naive();
if let Some(downloaded_on_day) = *self.downloaded_on_day.read().await {
if today == downloaded_on_day {
if let Some(downloaded_on_day) = *self.downloaded_on_day.read().await
&& today == downloaded_on_day {
return;
}
}
self.reset().await;
*self.downloaded_on_day.write().await = Some(today);