mirror of
https://github.com/flibusta-apps/telegram_files_cache_server.git
synced 2025-12-06 14:45:36 +01:00
Update retry defer
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import collections
|
import collections
|
||||||
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
from tempfile import SpooledTemporaryFile
|
from tempfile import SpooledTemporaryFile
|
||||||
from typing import Optional, cast
|
from typing import Optional, cast
|
||||||
@@ -65,7 +66,7 @@ async def cache_file(book: Book, file_type: str) -> Optional[CachedFile]:
|
|||||||
).exists():
|
).exists():
|
||||||
return
|
return
|
||||||
|
|
||||||
retry_exc = Retry(defer=60)
|
retry_exc = Retry(defer=timedelta(minutes=15))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
data = await download(book.source.id, book.remote_id, file_type)
|
data = await download(book.source.id, book.remote_id, file_type)
|
||||||
|
|||||||
Reference in New Issue
Block a user