feat(negodata): lps_db 읽기전용 연결 기반 — DBType.LPS + 조건부 엔진 등록
LPS(인터넷 최저가 검색) 연동 1단계. price_history 동기화 배치가 쓸 읽기전용 접속을 기존 확장점(DBType enum + 세션매니저 맵)에 등록한다. - DBType.LPS=2, LpsDBConfig(read_* 만 — write 엔진 미등록으로 앱 차원 읽기전용 강제, write 요청 시 KeyError) - config name 비면 미등록(구버전 toml·LPS 없는 환경에서도 부팅 가능), 배치는 is_registered() 로 사전 확인 - env override: LPS_DB_HOST/PORT/USER/PASSWORD/NAME (도커용) - 검증: 엔진 등록·읽기 세션·write 가드 KeyError·lps_db.price_history 실조회 확인 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
18f6466a8b
commit
9e9de52200
5 files changed
+63
-2
No files matched your search
@@ -32,6 +32,20 @@ pool_size = 10
|
||||
max_overflow = 20
|
||||
sslmode = "" # 로컬: "" / 관리형 DB: "require"|"verify-ca"|"verify-full"
|
||||
|
||||
# 인터넷 최저가 검색(LPS) 결과 DB — 읽기전용(price_history 동기화 배치).
|
||||
# name 을 비우면 LPS 연동 비활성(엔진 미등록·배치 스킵). 도커는 LPS_DB_HOST 등 env 로 override.
|
||||
[LpsDBConfig]
|
||||
db_type = "postgresql"
|
||||
name = "lps_db"
|
||||
read_host = "127.0.0.1"
|
||||
read_port = 5432
|
||||
read_id = "postgres"
|
||||
read_pw = "postgres"
|
||||
show_log = false
|
||||
pool_size = 2
|
||||
max_overflow = 2
|
||||
sslmode = ""
|
||||
|
||||
[JwtToken]
|
||||
access_key = "<JWT_ACCESS_SECRET>"
|
||||
refresh_key = "<JWT_REFRESH_SECRET>"
|
||||
|
||||
Reference in new issue
Block a user