removed unused packages
This commit is contained in:
+2
-15
@@ -4,15 +4,13 @@ from __future__ import annotations
|
||||
|
||||
import os
|
||||
|
||||
from shared.datastore import Datastore
|
||||
from shared.docstore import connect_mongodb
|
||||
from shared.utils import check_env, setup_logging
|
||||
|
||||
from .app import init_app
|
||||
|
||||
# ensure env vars set
|
||||
NECESSARY_ENV_VAR_LIST = {
|
||||
'MONGO_HOST',
|
||||
'MONGO_ENDPOINT',
|
||||
'MONGO_DB',
|
||||
'MONGO_COLLECTION',
|
||||
'MONGO_USER',
|
||||
@@ -23,24 +21,13 @@ NECESSARY_ENV_VAR_LIST = {
|
||||
'MINIO_ACCESS_KEY',
|
||||
'MINIO_SECRET_KEY',
|
||||
'MINIO_BUCKET_NAME',
|
||||
'MINIO_BUCKET_NAME_MODELS',
|
||||
}
|
||||
check_env(NECESSARY_ENV_VAR_LIST)
|
||||
|
||||
# setup logging stream handler
|
||||
setup_logging()
|
||||
|
||||
# connect to database
|
||||
collection, db, client = connect_mongodb()
|
||||
|
||||
# connect to minio
|
||||
datastore = Datastore()
|
||||
datastore.connect()
|
||||
|
||||
# initialise application
|
||||
app = init_app(
|
||||
mongo_collection=collection,
|
||||
datastore=datastore,
|
||||
)
|
||||
app = init_app()
|
||||
server = app.server
|
||||
server.config.update(SECRET_KEY=os.urandom(24))
|
||||
|
||||
Reference in New Issue
Block a user