Lint: fix ruff B905 (zip strict=) + S110 (try/except/pass) in similar-artists worker + perf endpoint
- similar_artists_worker._get_next_artist: zip(keys, row, strict=False) - log_artist_map_perf: log the exception instead of bare pass
This commit is contained in:
parent
843de8a45e
commit
8c6899c802
2 changed files with 3 additions and 3 deletions
|
|
@ -298,7 +298,7 @@ class SimilarArtistsWorker:
|
|||
if not row:
|
||||
return None
|
||||
keys = ['id', 'name'] + list(_LIBRARY_ID_COLUMNS)
|
||||
return dict(zip(keys, row))
|
||||
return dict(zip(keys, row, strict=False))
|
||||
except Exception as exc:
|
||||
logger.debug("Similar Artists _get_next_artist failed: %s", exc)
|
||||
return None
|
||||
|
|
|
|||
|
|
@ -28292,8 +28292,8 @@ def log_artist_map_perf():
|
|||
try:
|
||||
data = request.get_json(silent=True) or {}
|
||||
logger.info("[ARTMAP-PERF] %s", json.dumps(data, ensure_ascii=False))
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as e:
|
||||
logger.debug("artist-map perf log failed: %s", e)
|
||||
return ('', 204)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue