From 3f831d5a47d0804de703d7bd0ded9a27cfa12d20 Mon Sep 17 00:00:00 2001 From: Adam Kariv Date: Thu, 13 Jun 2024 15:08:01 +0300 Subject: [PATCH] Use local cache dir for resource processor --- odds/backend/processor/resource_processor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/odds/backend/processor/resource_processor.py b/odds/backend/processor/resource_processor.py index cc1a4eb..5386a79 100644 --- a/odds/backend/processor/resource_processor.py +++ b/odds/backend/processor/resource_processor.py @@ -15,7 +15,10 @@ TMP_DIR = os.environ.get('RESOURCE_PROCESSOR_CACHE_DIR') or CACHE_DIR / 'resource-processor-temp' -TMP_DIR.mkdir(exist_ok=True, parents=True) +try: + TMP_DIR.mkdir(exist_ok=True, parents=True) +except: + pass TMP_DIR = str(TMP_DIR) class ResourceProcessor: