"""안내문 발송(outreach) 모듈 — 리스트(이메일·인스타그램 주소 + 이름)에 안내문을 보낸다(2026-10-27). - 라우터: `router.py` (prefix=/outreach) · 저장소: `db.py` (outreach_db) · 순수 함수: `store.py`(주소 판별·{이름}·본문) - 메일 일괄 발송: `send.py` — 보내는 사람 본인 Gmail(입출고·휴가와 같은 Gmail 연결) - 인스타 DM: 반자동(문구 복사 + DM 창 열기 + [보냄] 기록) — 인스타 공식 API 는 처음 연락하는 사람에게 DM 을 보낼 수 없다. - 템플릿: `templates/outreach/`, 화면 스크립트·스타일 `static/outreach.{js,css}` OUTREACH_DB_URL 미설정이면 build_outreach_store 가 None → 화면이 "설정 필요" 안내(앱은 죽지 않음). 권한키 `outreach`. """ from typing import Any from .router import router __all__ = ["router", "build_outreach_store"] def build_outreach_store(*, dsn: str | None) -> Any: if not dsn: return None from .db import OutreachDBStore # 지연 import st = OutreachDBStore(dsn) try: st.release_stuck() # 서버가 보내던 중 다시 시작됨 → 발송중 줄을 실패로(다시 보낼 수 있게) except Exception: # noqa: BLE001 — DB 가 잠시 없어도 앱은 뜬다 pass return st