mirror of
https://github.com/flibusta-apps/telegram_files_cache_server.git
synced 2025-12-06 14:45:36 +01:00
Fix
This commit is contained in:
@@ -125,13 +125,10 @@ 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:
|
if await lock.locked() and not by_request:
|
||||||
async with lock:
|
raise Retry
|
||||||
result = await cache_file(book, file_type)
|
|
||||||
except Exception as e:
|
result = await cache_file(book, file_type)
|
||||||
if by_request:
|
|
||||||
return None
|
|
||||||
raise Retry from e
|
|
||||||
|
|
||||||
if by_request:
|
if by_request:
|
||||||
return result
|
return result
|
||||||
|
|||||||
Reference in New Issue
Block a user