mirror of
https://github.com/n08i40k/schedule-parser-rusted.git
synced 2025-12-06 17:57:47 +03:00
fix(cache): fix setting cache_update_required flag in cache status
This commit is contained in:
@@ -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(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user