mirror of
https://github.com/flibusta-apps/telegram_files_server.git
synced 2025-12-06 12:35:39 +01:00
Use uvloop
This commit is contained in:
@@ -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"]
|
||||
)
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from fastapi.security import APIKeyHeader
|
||||
|
||||
|
||||
default_security = APIKeyHeader(name="Authorization")
|
||||
|
||||
@@ -2,6 +2,7 @@ from typing import Optional
|
||||
|
||||
from pydantic import BaseModel, BaseSettings
|
||||
|
||||
|
||||
BotToken = str
|
||||
TelethonSessionName = str
|
||||
|
||||
|
||||
@@ -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}"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from core.app import start_app
|
||||
|
||||
|
||||
app = start_app()
|
||||
|
||||
Reference in New Issue
Block a user