kin: BATON-ARCH-012-backend_dev

This commit is contained in:
Gros Frumos 2026-03-20 21:01:48 +02:00
parent 8ecaeeafc6
commit 9ee79f7a88
3 changed files with 6 additions and 2 deletions

View file

@ -31,8 +31,9 @@ async def lifespan(app: FastAPI):
await db.init_db()
logger.info("Database initialized")
await telegram.set_webhook(url=config.WEBHOOK_URL, secret=config.WEBHOOK_SECRET)
logger.info("Webhook registered")
if config.WEBHOOK_ENABLED:
await telegram.set_webhook(url=config.WEBHOOK_URL, secret=config.WEBHOOK_SECRET)
logger.info("Webhook registered")
# v2.0 feature — агрегатор отключён в v1 (ADR-004)
# task = asyncio.create_task(aggregator.run())