Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Commit e139d0a

Browse files
committed
Add feedback from Tien
1 parent 2945cb2 commit e139d0a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

samples/django/13.core-bot/bots/views.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,15 @@ def messages(request):
3333

3434
bot_app = apps.get_app_config('bots')
3535
bot = bot_app.bot
36+
loop = bot_app.LOOP
3637
adapter = bot_app.ADAPTER
3738

3839
async def aux_func(turn_context):
3940
await bot.on_turn(turn_context)
4041

4142
try:
42-
task = asyncio.ensure_future(adapter.process_activity(activity, auth_header, aux_func), loop=bot_app.LOOP)
43-
bot_app.LOOP.run_until_complete(task)
43+
task = asyncio.ensure_future(adapter.process_activity(activity, auth_header, aux_func), loop=loop)
44+
loop.run_until_complete(task)
4445
return HttpResponse(status=201)
4546
except Exception as exception:
4647
raise exception

0 commit comments

Comments
 (0)