Add retry after download fail

This commit is contained in:
2022-03-23 15:47:12 +03:00
parent 3b5fef987a
commit e5b56a3c15

View File

@@ -61,7 +61,7 @@ async def cache_file(book: Book, file_type) -> Optional[CachedFile]:
data = await download(book.source.id, book.remote_id, file_type) data = await download(book.source.id, book.remote_id, file_type)
if data is None: if data is None:
return None raise Retry(defer=60)
response, client, filename = data response, client, filename = data
caption = get_caption(book) caption = get_caption(book)