Fix CACHE_DIR default path mismatch across files

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 <noreply@anthropic.com>
This commit is contained in:
giles
2026-01-11 08:14:39 +00:00
parent 8fd9acce28
commit 1869a76157
3 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -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'

View File

@@ -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'