Merge branch 'feature/core' of v2.discours.io:core into feature/core
Some checks failed
Deploy to core / deploy (push) Has been cancelled

This commit is contained in:
2024-01-28 10:03:51 +03:00
6 changed files with 11 additions and 22 deletions

View File

@@ -2,6 +2,7 @@ import os
from importlib import import_module
from os.path import exists
import sentry_sdk
from ariadne import load_schema_from_path, make_executable_schema
from ariadne.asgi import GraphQL
from sentry_sdk.integrations.aiohttp import AioHttpIntegration
@@ -26,7 +27,8 @@ schema = make_executable_schema(load_schema_from_path('schemas/core.graphql'), r
async def start_up():
print(f'[main] starting in {MODE} mode')
await redis.connect()
with sentry_sdk.start_transaction(op='task', name='Redis Connection'):
await redis.connect()
# start viewed service
await ViewedStorage.init()
@@ -40,8 +42,6 @@ async def start_up():
if MODE == 'production':
# sentry monitoring
try:
import sentry_sdk
sentry_sdk.init(
SENTRY_DSN,
enable_tracing=True,