fix: DynamicImporter vertical bug + increase rate limit to 2s
Some checks failed
Deploy Fediversion / deploy (push) Failing after 1s

This commit is contained in:
fullsizemalt 2025-12-28 17:33:14 -08:00
parent 73df24f28f
commit d11878fdcd
2 changed files with 5 additions and 4 deletions

View file

@ -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"

View file

@ -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):