From 1869a76157e8332f7866ce359f19c39651fd56fb Mon Sep 17 00:00:00 2001 From: giles Date: Sun, 11 Jan 2026 08:14:39 +0000 Subject: [PATCH] Fix CACHE_DIR default path mismatch across files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed default from /data/cache to ~/.artdag/cache for local runs. Docker sets CACHE_DIR=/data/cache via environment variable. Files updated: - tasks/analyze.py - tasks/orchestrate.py - app/config.py 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- app/config.py | 4 ++-- tasks/analyze.py | 2 +- tasks/orchestrate.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/config.py b/app/config.py index 4e8a7cc..d89af0a 100644 --- a/app/config.py +++ b/app/config.py @@ -19,9 +19,9 @@ class Settings: port: int = field(default_factory=lambda: int(os.environ.get("PORT", "8000"))) debug: bool = field(default_factory=lambda: os.environ.get("DEBUG", "").lower() == "true") - # Cache + # Cache (use /data/cache in Docker via env var, ~/.artdag/cache locally) cache_dir: Path = field( - default_factory=lambda: Path(os.environ.get("CACHE_DIR", "/data/cache")) + default_factory=lambda: Path(os.environ.get("CACHE_DIR", str(Path.home() / ".artdag" / "cache"))) ) # Redis diff --git a/tasks/analyze.py b/tasks/analyze.py index d68f9bf..8cdb9a1 100644 --- a/tasks/analyze.py +++ b/tasks/analyze.py @@ -28,7 +28,7 @@ except ImportError: logger = logging.getLogger(__name__) # Cache directory for analysis results -CACHE_DIR = Path(os.environ.get('CACHE_DIR', '/data/cache')) +CACHE_DIR = Path(os.environ.get('CACHE_DIR', str(Path.home() / ".artdag" / "cache"))) ANALYSIS_CACHE_DIR = CACHE_DIR / 'analysis' diff --git a/tasks/orchestrate.py b/tasks/orchestrate.py index 2e9c740..f181ba6 100644 --- a/tasks/orchestrate.py +++ b/tasks/orchestrate.py @@ -42,7 +42,7 @@ from .execute import execute_step logger = logging.getLogger(__name__) # Cache directories -CACHE_DIR = Path(os.environ.get('CACHE_DIR', '/data/cache')) +CACHE_DIR = Path(os.environ.get('CACHE_DIR', str(Path.home() / ".artdag" / "cache"))) ANALYSIS_CACHE_DIR = CACHE_DIR / 'analysis' PLAN_CACHE_DIR = CACHE_DIR / 'plans'