diff --git a/plexus/settings_production.py b/plexus/settings_production.py index c6ae969a..970373a9 100644 --- a/plexus/settings_production.py +++ b/plexus/settings_production.py @@ -1,10 +1,7 @@ import os -import sys from django.conf import settings from plexus.settings_shared import * # noqa: F403 -from ctlsettings.production import common -import sentry_sdk -from sentry_sdk.integrations.django import DjangoIntegration +from ctlsettings.production import common, init_sentry project = 'plexus' base = os.path.dirname(__file__) @@ -24,10 +21,5 @@ except ImportError: pass -if ('migrate' not in sys.argv) and \ - ('collectstatic' not in sys.argv) and \ - hasattr(settings, 'SENTRY_DSN'): - sentry_sdk.init( - dsn=SENTRY_DSN, # noqa: F405 - integrations=[DjangoIntegration()], - ) +if hasattr(settings, 'SENTRY_DSN'): + init_sentry(SENTRY_DSN) # noqa F405 diff --git a/plexus/settings_staging.py b/plexus/settings_staging.py index b666b57b..68679cc1 100644 --- a/plexus/settings_staging.py +++ b/plexus/settings_staging.py @@ -1,10 +1,7 @@ import os -import sys from django.conf import settings from plexus.settings_shared import * # noqa: F403 -from ctlsettings.staging import common -import sentry_sdk -from sentry_sdk.integrations.django import DjangoIntegration +from ctlsettings.staging import common, init_sentry project = 'plexus' base = os.path.dirname(__file__) @@ -24,11 +21,5 @@ except ImportError: pass -if ('migrate' not in sys.argv) and \ - ('collectstatic' not in sys.argv) and \ - hasattr(settings, 'SENTRY_DSN'): - sentry_sdk.init( - dsn=SENTRY_DSN, # noqa: F405 - integrations=[DjangoIntegration()], - debug=True, - ) +if hasattr(settings, 'SENTRY_DSN'): + init_sentry(SENTRY_DSN) # noqa F405 diff --git a/requirements.txt b/requirements.txt index cd17334b..67840e14 100644 --- a/requirements.txt +++ b/requirements.txt @@ -94,7 +94,7 @@ beautifulsoup4==4.12.0 html5lib==1.1 -ctlsettings==0.3.3 +ctlsettings==0.3.4 pbr==6.1.0 PyYAML>=3.10.0 # MIT