feat: 사이트 전체 검사 기능 추가
도메인 하위 링크를 BFS로 자동 크롤링하여 페이지별 검사 수행. - BFS 링크 크롤러 (같은 도메인 필터링, max_pages/max_depth 설정) - 사이트 검사 오케스트레이션 (크롤링→순차 검사→집계) - SSE 실시간 진행 상태 (크롤링/검사/완료) - 페이지 트리 + 집계 결과 UI - UrlInputForm에 "사이트 전체 검사" 버튼 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@ -21,6 +21,11 @@ class Settings(BaseSettings):
|
||||
CATEGORY_TIMEOUT: int = 60
|
||||
MAX_HTML_SIZE: int = 10485760 # 10MB
|
||||
|
||||
# Site inspection
|
||||
SITE_MAX_PAGES: int = 20
|
||||
SITE_MAX_DEPTH: int = 2
|
||||
SITE_CONCURRENCY: int = 2
|
||||
|
||||
# Application
|
||||
PROJECT_NAME: str = "Web Inspector API"
|
||||
|
||||
|
||||
@ -19,11 +19,16 @@ async def connect_db() -> None:
|
||||
_client = AsyncIOMotorClient(settings.MONGODB_URL)
|
||||
_db = _client[settings.DB_NAME]
|
||||
|
||||
# Create indexes
|
||||
# Create indexes - inspections
|
||||
await _db.inspections.create_index("inspection_id", unique=True)
|
||||
await _db.inspections.create_index([("url", 1), ("created_at", -1)])
|
||||
await _db.inspections.create_index([("created_at", -1)])
|
||||
|
||||
# Create indexes - site_inspections
|
||||
await _db.site_inspections.create_index("site_inspection_id", unique=True)
|
||||
await _db.site_inspections.create_index([("domain", 1), ("created_at", -1)])
|
||||
await _db.site_inspections.create_index([("created_at", -1)])
|
||||
|
||||
# Verify connection
|
||||
await _client.admin.command("ping")
|
||||
logger.info("MongoDB connected successfully: %s", settings.DB_NAME)
|
||||
|
||||
Reference in New Issue
Block a user