feat: 初始化零工后端代码

This commit is contained in:
Daniel
2026-04-01 14:19:25 +08:00
parent c6fabe262c
commit 84f8be7c0e
41 changed files with 2813 additions and 147 deletions

View File

@@ -0,0 +1,23 @@
from __future__ import annotations
from functools import lru_cache
from app.core.config import get_settings
from app.services.ingest_queue import IngestQueue
from app.services.match_queue import MatchQueue
from app.services.traffic_guard import TrafficGuard
@lru_cache
def get_ingest_queue() -> IngestQueue:
return IngestQueue(get_settings())
@lru_cache
def get_match_queue() -> MatchQueue:
return MatchQueue(get_settings())
@lru_cache
def get_traffic_guard() -> TrafficGuard:
return TrafficGuard(get_settings())