Use uvloop

This commit is contained in:
2023-05-14 16:06:01 +02:00
parent 2ebd86e692
commit 217adb85ed
10 changed files with 18 additions and 12 deletions

View File

@@ -9,6 +9,7 @@ from app.serializers import CreateUploadedFile, UploadedFile
from app.services.file_downloader import FileDownloader
from app.services.file_uploader import FileUploader
router = APIRouter(
prefix="/api/v1/files", dependencies=[Depends(check_token)], tags=["files"]
)

View File

@@ -1,5 +1,6 @@
from fastapi import FastAPI
from fastapi.responses import ORJSONResponse
from prometheus_fastapi_instrumentator import Instrumentator
import sentry_sdk
@@ -8,6 +9,7 @@ from app.views import healthcheck_router, router
from core.config import env_config
from core.db import database
sentry_sdk.init(
env_config.SENTRY_DSN,
)

View File

@@ -1,3 +1,4 @@
from fastapi.security import APIKeyHeader
default_security = APIKeyHeader(name="Authorization")

View File

@@ -2,6 +2,7 @@ from typing import Optional
from pydantic import BaseModel, BaseSettings
BotToken = str
TelethonSessionName = str

View File

@@ -5,6 +5,7 @@ from sqlalchemy import MetaData
from core.config import env_config
DATABASE_URL = (
f"postgresql://{env_config.POSTGRES_USER}:{quote(env_config.POSTGRES_PASSWORD)}@"
f"{env_config.POSTGRES_HOST}:{env_config.POSTGRES_PORT}/{env_config.POSTGRES_DB}"

View File

@@ -1,3 +1,4 @@
from core.app import start_app
app = start_app()