-
-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into suggestion-feature
- Loading branch information
Showing
33 changed files
with
5,821 additions
and
1,295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
release: python manage.py migrate --noinput | ||
web: gunicorn blt.wsgi --log-file - --workers 2 --worker-class gthread --threads 2 --timeout 120 | ||
web: newrelic-admin run-program bin/start-pgbouncer uvicorn blt.asgi:application --host 0.0.0.0 --port ${PORT} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# asgi.py | ||
|
||
import os | ||
import tracemalloc | ||
|
||
import django | ||
|
||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "blt.settings") | ||
django.setup() | ||
|
||
from channels.auth import AuthMiddlewareStack | ||
from channels.routing import ProtocolTypeRouter, URLRouter | ||
from django.core.asgi import get_asgi_application | ||
from django.urls import path | ||
|
||
tracemalloc.start() | ||
|
||
from website import consumers # You will define a consumer for handling WebSockets | ||
|
||
application = ProtocolTypeRouter( | ||
{ | ||
"http": get_asgi_application(), | ||
"websocket": AuthMiddlewareStack( | ||
URLRouter( | ||
[ | ||
path("ws/similarity/", consumers.SimilarityConsumer.as_asgi()), # WebSocket URL | ||
] | ||
) | ||
), | ||
} | ||
) |
Oops, something went wrong.