backend 와 동일한 프레임워크로 lps/ 폴더를 신설한다. 구체적인 도메인 로직(크롤링/오픈API/최저가 산정)은 미정이라 골격만 구성한다. - FastAPI 부트스트랩(web_main/router) + lifespan·CORS·gzip·로그 미들웨어 + /healthz - TOML 설정 로더(APP_ENV) + pydantic config + DB env override - DB 세션 매니저(논리 DB × R/W, service→람다 위임) — 엔진 lazy 라 DB 없이도 부팅 - 공통 응답 규약(gmodel) + ErrorType/DBType/DBWRType - router→services→crud 계층 컨벤션(services/crud 는 빈 폴더로 자리만) - 포트 9400(backend 9300·agent 9500 회피), Dockerfile/run_local_server.sh/README - tests/test_health.py 스모크(healthz, DB 없이 통과) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
17 lines
338 B
Python
17 lines
338 B
Python
class Singleton:
|
|
_init = False
|
|
|
|
def __new__(cls, *args, **kwargs):
|
|
if not hasattr(cls, "instance"):
|
|
cls.instance = super(Singleton, cls).__new__(cls)
|
|
|
|
return cls.instance
|
|
|
|
@classmethod
|
|
def is_init(cls):
|
|
return cls._init
|
|
|
|
@classmethod
|
|
def set_init(cls):
|
|
cls._init = True
|