Fix compilation errors in Layer 4 caching
- Remove unused RelationshipInference import from base.rs - Add Parse error variant to MemoryError enum - Replace num_minutes() with num_seconds() / 60 (chrono compatibility) Fixes compatibility with different chrono versions.
This commit is contained in:
@@ -530,7 +530,7 @@ impl MemoryStore {
|
||||
.map_err(|e| MemoryError::Parse(e.to_string()))?
|
||||
.with_timezone(&Utc);
|
||||
|
||||
let age_minutes = (Utc::now() - cached_at).num_minutes();
|
||||
let age_minutes = (Utc::now() - cached_at).num_seconds() / 60;
|
||||
|
||||
if age_minutes < Self::RELATIONSHIP_CACHE_DURATION_MINUTES {
|
||||
let relationship: super::relationship::RelationshipInference =
|
||||
@@ -582,7 +582,7 @@ impl MemoryStore {
|
||||
.map_err(|e| MemoryError::Parse(e.to_string()))?
|
||||
.with_timezone(&Utc);
|
||||
|
||||
let age_minutes = (Utc::now() - cached_at).num_minutes();
|
||||
let age_minutes = (Utc::now() - cached_at).num_seconds() / 60;
|
||||
|
||||
if age_minutes < Self::RELATIONSHIP_CACHE_DURATION_MINUTES {
|
||||
let relationships: Vec<super::relationship::RelationshipInference> =
|
||||
|
||||
Reference in New Issue
Block a user