fix(cache): fix setting cache_update_required flag in cache status

This commit is contained in:
2025-05-25 17:39:23 +04:00
parent 9090716f87
commit ff9d7d6c3a

View File

@@ -99,7 +99,7 @@ impl From<&Schedule> for CacheStatus {
fn from(value: &Schedule) -> Self {
Self {
cache_hash: value.hash(),
cache_update_required: (value.fetched_at - Utc::now()) > Duration::minutes(5),
cache_update_required: (Utc::now() - value.fetched_at) > Duration::minutes(5),
last_cache_update: value.fetched_at.timestamp(),
last_schedule_update: value.updated_at.timestamp(),
}