removed unused packages

This commit is contained in:
brian
2025-04-15 21:56:33 +00:00
parent 7176dfdf90
commit 08062ad87d
14 changed files with 91 additions and 439 deletions
+2 -15
View File
@@ -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))