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:
Hyungi Ahn
2026-05-15 16:39:47 +09:00
parent 08cf676c26
commit 78b8b52a86
+5 -1
View File
@@ -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