mirror of
https://github.com/suitenumerique/docs.git
synced 2026-09-29 04:55:11 +02:00
This is a naive first switch from sync to async. This enables the backend to still answer to incomming requests while streaming LLM results to the user. For sure there is room for code cleaning and improvements, but this provides a nice improvement out of the box.
19 lines
508 B
Python
19 lines
508 B
Python
"""
|
|
ASGI config for impress project.
|
|
|
|
It exposes the ASGI callable as a module-level variable named ``application``.
|
|
|
|
For more information on this file, see
|
|
https://docs.djangoproject.com/en/dev/howto/deployment/asgi/
|
|
"""
|
|
|
|
import os
|
|
|
|
from configurations.asgi import get_asgi_application
|
|
|
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "impress.settings")
|
|
os.environ.setdefault("DJANGO_CONFIGURATION", "Development")
|
|
os.environ.setdefault("PYTHON_SERVER_MODE", "async")
|
|
|
|
application = get_asgi_application()
|