Skip to content
Snippets Groups Projects
Commit 04e7fc93 authored by ale's avatar ale
Browse files

Separate package with the uwsgi entry point

parent e2ff94c4
No related branches found
No related tags found
No related merge requests found
Pipeline #54123 passed
...@@ -27,4 +27,4 @@ RUN cd /tmp/wheels \ ...@@ -27,4 +27,4 @@ RUN cd /tmp/wheels \
ENV VIRTUALENV=/virtualenv ENV VIRTUALENV=/virtualenv
ENV UWSGI_ENGINE=threads ENV UWSGI_ENGINE=threads
ENV WSGI_APP=mat_api_server.api:create_app ENV WSGI_APP=mat_api_server.wsgi:application
...@@ -9,14 +9,6 @@ import tempfile ...@@ -9,14 +9,6 @@ import tempfile
app = Flask(__name__) app = Flask(__name__)
def create_app():
# Simple config from environment variables.
app.config.update({
'UPLOAD_DIR': os.getenv('UPLOAD_DIR'),
})
return app
def get_parser_by_mime_type(path, mime_type): def get_parser_by_mime_type(path, mime_type):
for parser_class in parser_factory._get_parsers(): for parser_class in parser_factory._get_parsers():
if mime_type in parser_class.mimetypes: if mime_type in parser_class.mimetypes:
......
import os
from .api import app
# Simple config from environment variables.
app.config.update({
'UPLOAD_DIR': os.getenv('UPLOAD_DIR'),
})
application = app
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment