aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2022-05-30 20:52:26 -0700
committerGravatar MarkKoz <[email protected]>2022-05-30 20:52:26 -0700
commit409a76fa4aee3e2ee979f402cb4662cfd0a6aef4 (patch)
treebe6833aa149fd77a97f8a95242cf81973c4fdddf
parentMake Sentry SDK and gunicorn optional dependencies (diff)
Remove redundant module for creating the WSGI app
-rw-r--r--Dockerfile2
-rw-r--r--snekbox/api/app.py3
-rw-r--r--tests/gunicorn_utils.py4
3 files changed, 3 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index c207a2b..7331ab4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -67,7 +67,7 @@ COPY config/ /snekbox/config/
FROM venv
ENTRYPOINT ["gunicorn"]
-CMD ["-c", "config/gunicorn.conf.py", "snekbox.api.app"]
+CMD ["-c", "config/gunicorn.conf.py", "snekbox.api:SnekAPI"]
COPY . /snekbox
WORKDIR /snekbox
diff --git a/snekbox/api/app.py b/snekbox/api/app.py
deleted file mode 100644
index c71e246..0000000
--- a/snekbox/api/app.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from . import SnekAPI
-
-application = SnekAPI()
diff --git a/tests/gunicorn_utils.py b/tests/gunicorn_utils.py
index f2d9b6d..b417b1b 100644
--- a/tests/gunicorn_utils.py
+++ b/tests/gunicorn_utils.py
@@ -17,8 +17,8 @@ class _StandaloneApplication(Application):
pass
def load(self):
- from snekbox.api.app import application
- return application
+ from snekbox.api import SnekAPI
+ return SnekAPI()
def load_config(self):
for key, value in self.options.items():