diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 6109fd26..25ee8bd7 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -1,8 +1,5 @@ name: 'Deploy to core' -on: - push: - branches: - - main +on: [push] jobs: deploy: @@ -24,8 +21,7 @@ jobs: - name: Push to dokku uses: dokku/github-action@master with: - branch: 'main' + branch: 'feature/core' git_remote_url: 'ssh://dokku@v2.discours.io:22/core' ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} - git_push_flags: '--force' - + git_push_flags: '--force' \ No newline at end of file diff --git a/main.py b/main.py index df42d056..9495cd6a 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,5 @@ import os +import sentry_sdk from importlib import import_module from os.path import exists @@ -26,7 +27,11 @@ 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 +45,7 @@ async def start_up(): if MODE == 'production': # sentry monitoring try: - import sentry_sdk - + sentry_sdk.init( SENTRY_DSN, enable_tracing=True, diff --git a/pyproject.toml b/pyproject.toml index 46e2d6f9..90c5f1c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ python = "^3.12" SQLAlchemy = "^2.0.22" psycopg2-binary = "^2.9.9" redis = {extras = ["hiredis"], version = "^5.0.1"} -sentry-sdk = "^1.39.1" +sentry-sdk = "^1.4.1" starlette = "^0.36.1" gql = "^3.4.1" ariadne = "^0.21"