This commit is contained in:
2023-05-20 21:12:09 +02:00
parent a5cc020eef
commit a202e70981

View File

@@ -125,8 +125,13 @@ async def cache_file_by_book_id(
f"{book_id}_{file_type}", blocking_timeout=5, thread_local=False f"{book_id}_{file_type}", blocking_timeout=5, thread_local=False
) )
try:
async with lock: async with lock:
result = await cache_file(book, file_type) result = await cache_file(book, file_type)
except Exception as e:
if by_request:
return None
raise Retry from e
if by_request: if by_request:
return result return result