models: Remove unused extractor_cache_valid methods

master
Felix Stupp 3 years ago
parent a39ad912b5
commit fe183d0411
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -1,7 +1,7 @@
from __future__ import annotations from __future__ import annotations
from dataclasses import dataclass from dataclasses import dataclass
from datetime import datetime, timedelta from datetime import datetime
import logging import logging
from typing import Dict, Iterable, List, Optional, Set from typing import Dict, Iterable, List, Optional, Set
@ -130,9 +130,6 @@ class MediaElement(db.Entity):
_uris: Iterable[MediaUriMapping] = orm.Set(lambda: MediaUriMapping) _uris: Iterable[MediaUriMapping] = orm.Set(lambda: MediaUriMapping)
collection_links: Iterable[MediaCollectionLink] = orm.Set(lambda: MediaCollectionLink) collection_links: Iterable[MediaCollectionLink] = orm.Set(lambda: MediaCollectionLink)
def extractor_cache_valid(self, max_age: timedelta):
return (datetime.now() - self.last_updated) < max_age
def __get_cache(self): def __get_cache(self):
return self._extractor_cache return self._extractor_cache
def __set_cache(self, cache: Dict): def __set_cache(self, cache: Dict):
@ -243,9 +240,6 @@ class MediaCollection(db.Entity):
_uris: Iterable[CollectionUriMapping] = orm.Set(lambda: CollectionUriMapping) _uris: Iterable[CollectionUriMapping] = orm.Set(lambda: CollectionUriMapping)
media_links: Iterable[MediaCollectionLink] = orm.Set(MediaCollectionLink) media_links: Iterable[MediaCollectionLink] = orm.Set(MediaCollectionLink)
def extractor_cache_valid(self, max_age: timedelta):
return (datetime.now() - self.last_updated) < max_age
def __get_cache(self): def __get_cache(self):
return self._extractor_cache return self._extractor_cache
def __set_cache(self, cache: Dict): def __set_cache(self, cache: Dict):

Loading…
Cancel
Save