Skip to content

Commit

Permalink
feat: integrate django channels into the project
Browse files Browse the repository at this point in the history
This will help the project integrate other non-http protocols such as websockets in the future thus making this a robust platform to serve metadata and receive data from IDR clients.
  • Loading branch information
kennedykori committed Oct 17, 2022
1 parent 7286402 commit 6f26719
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion config/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@

import os

from channels.routing import ProtocolTypeRouter
from django.core.asgi import get_asgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
# Initialize Django ASGI application early to ensure the AppRegistry
# is populated before importing code that may import ORM models.
django_asgi_app = get_asgi_application()

application = get_asgi_application()
application = ProtocolTypeRouter({"http": django_asgi_app})
4 changes: 2 additions & 2 deletions requirements/production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ grpcio~=1.49.1
# Others
# -----------------------------------------------------------------------------
gunicorn~=20.1.0
sentry-sdk~=1.9.1
uvicorn~=0.18.2
sentry-sdk~=1.9.10
uvicorn~=0.18.3
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ django-stubs~=1.12.0
# -----------------------------------------------------------------------------
factory-boy~=3.2.1
Faker~=15.1.1
model-bakery~=1.8.0
pytest-cov~=4.0.0
pytest-django~=4.5.2
pytest-forked~=1.4.0
pytest-sugar~=0.9.5
pytest-xdist~=2.5.0
pytest~=7.1.3
tox~=3.26.0
model-bakery~=1.8.0

# Coverage
# -----------------------------------------------------------------------------
Expand Down

0 comments on commit 6f26719

Please sign in to comment.