File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1313from pycamp_bot .commands import schedule
1414from pycamp_bot .commands import announcements
1515from pycamp_bot .commands import devtools
16+ from pycamp_bot .constants import SENTRY_DATA_SOURCE_NAME_ENVVAR
1617from pycamp_bot .models import models_db_connection
1718from pycamp_bot .logger import logger
1819
1920
20- SENTRY_DATA_SOURCE_NAME_ENVVAR = 'SENTRY_DATA_SOURCE_NAME'
2121if SENTRY_DATA_SOURCE_NAME_ENVVAR in os .environ :
2222 sentry_sdk .init (dsn = os .environ [SENTRY_DATA_SOURCE_NAME_ENVVAR ])
2323
Original file line number Diff line number Diff line change 1+ import os
12import subprocess
23import sys
34
45from telegram .ext import CommandHandler
56
7+ from pycamp_bot .constants import SENTRY_DATA_SOURCE_NAME_ENVVAR
68from pycamp_bot .utils import escape_markdown
79
810
@@ -28,6 +30,11 @@ async def show_version(update, context):
2830 for pip_line in pip_freeze .stdout .decode ().splitlines ():
2931 dependencies .append (escape_markdown (pip_line ))
3032
33+ if SENTRY_DATA_SOURCE_NAME_ENVVAR in os .environ :
34+ sentry_envvar_set = '🟢'
35+ else :
36+ sentry_envvar_set = '🔴'
37+
3138 lines = [
3239 f'Commit deployado: `{ commit } `' ,
3340 f'Fecha del commit \\ (author date\\ ): `{ escape_markdown (author_date )} `' ,
@@ -37,6 +44,7 @@ async def show_version(update, context):
3744 '```' ,
3845 * dependencies ,
3946 '```' ,
47+ f'Variable de entorno de Sentry definida: { sentry_envvar_set } ' ,
4048 ]
4149
4250 await update .message .reply_text ('\n ' .join (lines ), parse_mode = 'MarkdownV2' )
Original file line number Diff line number Diff line change 1+ SENTRY_DATA_SOURCE_NAME_ENVVAR = 'SENTRY_DATA_SOURCE_NAME'
You can’t perform that action at this time.
0 commit comments