Merge branch 'feature/core' of v2.discours.io:core into feature/core

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

View File

@ -1,8 +1,5 @@
name: 'Deploy to core' name: 'Deploy to core'
on: on: [push]
push:
branches:
- main
jobs: jobs:
deploy: deploy:
@ -24,8 +21,7 @@ jobs:
- name: Push to dokku - name: Push to dokku
uses: dokku/github-action@master uses: dokku/github-action@master
with: with:
branch: 'main' branch: 'feature/core'
git_remote_url: 'ssh://dokku@v2.discours.io:22/core' git_remote_url: 'ssh://dokku@v2.discours.io:22/core'
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
git_push_flags: '--force' git_push_flags: '--force'

View File

@ -1,4 +1,5 @@
import os import os
import sentry_sdk
from importlib import import_module from importlib import import_module
from os.path import exists from os.path import exists
@ -26,6 +27,10 @@ schema = make_executable_schema(load_schema_from_path('schemas/core.graphql'), r
async def start_up(): async def start_up():
print(f'[main] starting in {MODE} mode') print(f'[main] starting in {MODE} mode')
with sentry_sdk.start_transaction(
op="task",
name="Redis Connection"
):
await redis.connect() await redis.connect()
# start viewed service # start viewed service
@ -40,7 +45,6 @@ async def start_up():
if MODE == 'production': if MODE == 'production':
# sentry monitoring # sentry monitoring
try: try:
import sentry_sdk
sentry_sdk.init( sentry_sdk.init(
SENTRY_DSN, SENTRY_DSN,

View File

@ -11,7 +11,7 @@ python = "^3.12"
SQLAlchemy = "^2.0.22" SQLAlchemy = "^2.0.22"
psycopg2-binary = "^2.9.9" psycopg2-binary = "^2.9.9"
redis = {extras = ["hiredis"], version = "^5.0.1"} redis = {extras = ["hiredis"], version = "^5.0.1"}
sentry-sdk = "^1.39.1" sentry-sdk = "^1.4.1"
starlette = "^0.36.1" starlette = "^0.36.1"
gql = "^3.4.1" gql = "^3.4.1"
ariadne = "^0.21" ariadne = "^0.21"