-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #310 from ropable/master
Add SSE view for device location, switch to use ASGI server, bugfix DeviceResource
- Loading branch information
Showing
19 changed files
with
1,265 additions
and
500 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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "resource_tracking" | ||
version = "1.4.21" | ||
version = "1.4.22" | ||
description = "DBCA internal corporate application to download and serve data from remote tracking devices." | ||
authors = ["DBCA OIM <[email protected]>"] | ||
license = "Apache-2.0" | ||
|
@@ -20,10 +20,13 @@ django-geojson = "4.1.0" | |
unicodecsv = "0.14.1" | ||
whitenoise = { version = "6.8.2", extras = ["brotli"] } | ||
azure-storage-blob = "12.23.1" | ||
sentry-sdk = { version = "2.19.0", extras = ["django"] } | ||
sentry-sdk = {version = "2.19.2", extras = ["django"]} | ||
uvicorn = { extras = ["standard"], version = "^0.34.0" } | ||
uvicorn-worker = "^0.3.0" | ||
orjson = "3.10.13" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
ipython = "^8.30.0" | ||
ipython = "^8.31.0" | ||
ipdb = "^0.13.13" | ||
pre-commit = "^4.0.1" | ||
mixer = "^7.2.2" | ||
|
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,20 @@ | ||
""" | ||
ASGI config for resource_tracking project. | ||
It exposes the ASGI callable as a module-level variable named ``application``. | ||
""" | ||
|
||
import os | ||
from pathlib import Path | ||
|
||
from django.core.asgi import get_asgi_application | ||
|
||
# These lines are required for interoperability between local and container environments. | ||
d = Path(__file__).resolve().parent.parent | ||
dot_env = os.path.join(str(d), ".env") | ||
if os.path.exists(dot_env): | ||
from dotenv import load_dotenv | ||
|
||
load_dotenv() | ||
|
||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "resource_tracking.settings") | ||
application = get_asgi_application() |
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,9 @@ | ||
from typing import Any, Dict | ||
|
||
from uvicorn.workers import UvicornWorker as BaseUvicornWorker | ||
|
||
|
||
class UvicornWorker(BaseUvicornWorker): | ||
# UvicornWorker doesn't support the lifespan protocol. | ||
# Reference: https://stackoverflow.com/a/75996092/14508 | ||
CONFIG_KWARGS: Dict[str, Any] = {"loop": "auto", "http": "auto", "lifespan": "off"} |
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
Oops, something went wrong.