mirror of
https://github.com/flibusta-apps/library_updater.git
synced 2025-12-06 15:45:36 +01:00
Add sentry
This commit is contained in:
@@ -2,6 +2,7 @@ from fastapi import FastAPI
|
||||
|
||||
from app.views import router
|
||||
from core.arq_pool import get_arq_pool
|
||||
import core.sentry # noqa: F401
|
||||
|
||||
|
||||
def start_app() -> FastAPI:
|
||||
|
||||
@@ -30,5 +30,7 @@ class EnvConfig(BaseSettings):
|
||||
|
||||
FL_BASE_URL: str
|
||||
|
||||
SENTRY_DSN: str
|
||||
|
||||
|
||||
env_config = EnvConfig()
|
||||
|
||||
8
src/core/sentry.py
Normal file
8
src/core/sentry.py
Normal file
@@ -0,0 +1,8 @@
|
||||
import sentry_sdk
|
||||
|
||||
from core.config import env_config
|
||||
|
||||
|
||||
sentry_sdk.init(
|
||||
env_config.SENTRY_DSN,
|
||||
)
|
||||
@@ -4,6 +4,7 @@ from arq.cron import cron
|
||||
from app.services.updaters.fl_updater import __tasks__ as fl_tasks
|
||||
from app.services.updaters.fl_updater import run_fl_update
|
||||
from core.arq_pool import get_redis_settings, get_arq_pool
|
||||
import core.sentry # noqa: F401
|
||||
|
||||
|
||||
async def startup(ctx):
|
||||
|
||||
Reference in New Issue
Block a user