From 26b4206e779b42526bb5ab55c769f03b4397129b Mon Sep 17 00:00:00 2001 From: Harpo Date: Fri, 29 Dec 2023 22:50:20 -0800 Subject: [PATCH] Updates download error handling --- .vscode/launch.json | 2 +- alfred/main.py | 43 ++++++++++++++++++++++--------------------- alfred/otto | 2 +- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index f92fceb3..e114add2 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -16,7 +16,7 @@ "CELERY_BACKEND": "mongodb://localhost:27017/celery", "DB_URL": "mongodb://localhost:27017", "DB_NAME": "alfred", - "GOOGLE_APPLICATION_CREDENTIALS": "/cred.json", + "GOOGLE_APPLICATION_CREDENTIALS": "../cred.json", "ALFRED_SECRET_KEY": "ALFRED_SECRET_KEY" }, "jinja": false, diff --git a/alfred/main.py b/alfred/main.py index 75e053fe..a4e44e0c 100644 --- a/alfred/main.py +++ b/alfred/main.py @@ -1,33 +1,34 @@ -from fastapi import FastAPI, Depends -from fastapi.middleware.gzip import GZipMiddleware -from starlette.staticfiles import StaticFiles -from beanie import init_beanie - from subprocess import run as bash -from alfred.core.routes import authAPI -from alfred.core.routes import videoAPI -from alfred.core.routes import issueAPI -from alfred.core.routes import adminAPI -from alfred.core.routes import fontAPI -from alfred.core.routes import ProjectAPI -from alfred.core.routes import RenderAPI -from alfred.core.routes import previewAPI +from beanie import init_beanie +from fastapi import Depends, FastAPI +from fastapi.middleware.gzip import GZipMiddleware +from starlette.staticfiles import StaticFiles -# from otto.main import app as ottoApi -from alfred.core.utils import get_db +from alfred import docs +from alfred.config import DATA_DIR, STATIC_DIR +from alfred.core.models.users import UserRead, UserUpdate +from alfred.core.routes import ( + ProjectAPI, + RenderAPI, + adminAPI, + authAPI, + fontAPI, + issueAPI, + previewAPI, + videoAPI, +) # from alfred.core.utils.db import deOid from alfred.core.routes.users import ( - fastapi_users, - current_active_user, current_active_superuser, + current_active_user, + fastapi_users, ) -from alfred.core.models.users import UserRead, UserUpdate -from alfred.core.utils.db import User -from alfred import docs -from alfred.config import DATA_DIR, STATIC_DIR +# from otto.main import app as ottoApi +from alfred.core.utils import get_db +from alfred.core.utils.db import User app = FastAPI( title=docs.title, diff --git a/alfred/otto b/alfred/otto index c57b2ad7..0c7a1fef 160000 --- a/alfred/otto +++ b/alfred/otto @@ -1 +1 @@ -Subproject commit c57b2ad70afa9af629efd0b58f8c2585db501a78 +Subproject commit 0c7a1feffa4d106ed0cc25fa6e2864bd04758ded