fix(news): backfill script sys.path 컨테이너 호환 (parent.parent / 'app' 또는 parent.parent)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,11 @@ import sys
|
||||
from datetime import datetime, timezone
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / "app"))
|
||||
_repo_root = Path(__file__).resolve().parent.parent
|
||||
for _candidate in (_repo_root / "app", _repo_root):
|
||||
if (_candidate / "core").is_dir() and str(_candidate) not in sys.path:
|
||||
sys.path.insert(0, str(_candidate))
|
||||
break
|
||||
|
||||
from sqlalchemy import text
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
Reference in New Issue
Block a user