From 848c5b70b205de67762438fcfb6b2a8e190d0f4f Mon Sep 17 00:00:00 2001 From: timofey Date: Thu, 27 Oct 2022 14:20:38 +0000 Subject: [PATCH] caching failure be not task failure --- v6d3music/core/cache_url.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v6d3music/core/cache_url.py b/v6d3music/core/cache_url.py index ab4ca99..37eecff 100644 --- a/v6d3music/core/cache_url.py +++ b/v6d3music/core/cache_url.py @@ -40,7 +40,8 @@ async def cache_url(hurl: str, rurl: str, override: bool, tor: bool) -> None: with Benchmark('CCH'): code = await loop.run_in_executor(None, p.wait) if code: - raise RuntimeError(code) + print(f'caching {hurl} failed with {code}') + return await loop.run_in_executor(None, tmp_path.rename, path) await cache_db.set(f'url:{hurl}', str(path)) print('cached', hurl)