Shared backend + frontend for multi-customer EMS deployments. - 12 enterprise modules: quota, cost, charging, maintenance, analysis, etc. - 120+ API endpoints, 37 database tables - Customer config mechanism (CUSTOMER env var + YAML config) - Collectors: Modbus TCP, MQTT, HTTP API, Sungrow iSolarCloud - Frontend: React 19 + Ant Design + ECharts + Three.js - Infrastructure: Redis cache, rate limiting, aggregation engine Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
25 lines
523 B
Python
25 lines
523 B
Python
from celery import Celery
|
|
from app.core.config import get_settings
|
|
|
|
settings = get_settings()
|
|
|
|
celery_app = Celery(
|
|
"tianpu_ems",
|
|
broker=settings.REDIS_URL,
|
|
backend=settings.REDIS_URL,
|
|
)
|
|
|
|
celery_app.conf.update(
|
|
task_serializer="json",
|
|
accept_content=["json"],
|
|
result_serializer="json",
|
|
timezone="Asia/Shanghai",
|
|
enable_utc=False,
|
|
task_track_started=True,
|
|
task_routes={
|
|
"app.tasks.report_tasks.*": {"queue": "reports"},
|
|
},
|
|
)
|
|
|
|
celery_app.autodiscover_tasks(["app.tasks"])
|