add route to remove playlist banner

This commit is contained in:
mungai-njoroge
2023-07-26 10:56:23 +03:00
parent 6439b512e9
commit 728c6c2def
4 changed files with 51 additions and 10 deletions
+14 -8
View File
@@ -271,13 +271,19 @@ class FetchSimilarArtistsLastFM:
def __init__(self) -> None:
artists = ArtistStore.artists
with Pool(processes=cpu_count()) as pool:
results = list(
tqdm(
pool.imap_unordered(save_similar_artists, artists),
total=len(artists),
desc="Fetching similar artists",
try:
with Pool(processes=cpu_count()) as pool:
results = list(
tqdm(
pool.imap_unordered(save_similar_artists, artists),
total=len(artists),
desc="Fetching similar artists",
)
)
)
list(results)
list(results)
except TypeError:
print("TypeError: Handled!!")
# 🤷
# TypeError: JSONDecodeError.__init__() missing 2 required positional arguments: 'doc' and 'pos'
pass