mirror of
https://github.com/flibusta-apps/fb2converter_server.git
synced 2025-12-06 06:55:36 +01:00
Add sentry
This commit is contained in:
0
app/__init__.py
Normal file
0
app/__init__.py
Normal file
8
app/config.py
Normal file
8
app/config.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from pydantic import BaseSettings
|
||||
|
||||
|
||||
class EnvConfig(BaseSettings):
|
||||
SENTRY_DSN: str
|
||||
|
||||
|
||||
env_config = EnvConfig()
|
||||
@@ -18,6 +18,14 @@ from starlette.background import BackgroundTask
|
||||
|
||||
import aiofiles
|
||||
import aiofiles.ospath
|
||||
import sentry_sdk
|
||||
|
||||
from config import env_config
|
||||
|
||||
|
||||
sentry_sdk.init(
|
||||
env_config.SENTRY_DSN,
|
||||
)
|
||||
|
||||
|
||||
router = APIRouter(tags=["converter"])
|
||||
|
||||
Reference in New Issue
Block a user