fix: DynamicImporter vertical bug + increase rate limit to 2s
Some checks failed
Deploy Fediversion / deploy (push) Failing after 1s
Some checks failed
Deploy Fediversion / deploy (push) Failing after 1s
This commit is contained in:
parent
73df24f28f
commit
d11878fdcd
2 changed files with 5 additions and 4 deletions
|
|
@ -30,7 +30,7 @@ class ImporterBase(ABC):
|
|||
VERTICAL_DESCRIPTION: str = ""
|
||||
|
||||
# Rate limiting
|
||||
REQUEST_DELAY: float = 0.5 # seconds between requests
|
||||
REQUEST_DELAY: float = 2.0 # seconds between requests (setlist.fm is strict)
|
||||
|
||||
# Cache settings
|
||||
CACHE_DIR: Path = Path(__file__).parent / ".cache"
|
||||
|
|
|
|||
|
|
@ -44,13 +44,14 @@ class DynamicImporter(SetlistFmImporter):
|
|||
self.VERTICAL_SLUG = vertical.slug
|
||||
self.VERTICAL_DESCRIPTION = vertical.description or ""
|
||||
self.ARTIST_MBID = mbid
|
||||
self._vertical_id = vertical.id
|
||||
self._vertical_obj = vertical
|
||||
super().__init__(session)
|
||||
|
||||
def get_or_create_vertical(self):
|
||||
"""Override to use existing vertical"""
|
||||
self.vertical_id = self._vertical_id
|
||||
return self._vertical_id
|
||||
self.vertical = self._vertical_obj
|
||||
self.vertical_id = self._vertical_obj.id
|
||||
return self._vertical_obj
|
||||
|
||||
|
||||
def run_import(slug: str):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue