File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323from sqlalchemy .orm import sessionmaker
2424
2525from answer import __version__
26- from answer .bot .tg_bot .initialisation import bot_shutdown , bot_startup , start_polling
26+ from answer .bot .tg_bot .initialisation import bot_shutdown , bot_startup
2727from answer .models .db import Conversation , User
2828from answer .schemas .api_models import (
2929 ConversationContextResponse ,
@@ -120,13 +120,9 @@ async def webhook_handler(request: Request):
120120async def init_resources ():
121121 global bot , dp
122122
123- bot , dp = await bot_startup (use_webhook = settings . USE_WEBHOOK )
123+ bot , dp = await bot_startup ()
124124 app .state .bot = bot
125125
126- if not settings .USE_WEBHOOK :
127- asyncio .create_task (start_polling ())
128- logger .info ("Polling task started in background" )
129-
130126 app .state .embedder = init_embedder ()
131127
132128 app .state .qdrant_client = QdrantClient (
You can’t perform that action at this time.
0 commit comments