Skip to content

Commit

Permalink
Merge pull request #3212 from ccnmtl/init-sentry
Browse files Browse the repository at this point in the history
Update ctlsettings and use init_sentry
  • Loading branch information
nikolas authored Aug 23, 2024
2 parents b8d3feb + 643b632 commit 33eb482
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 24 deletions.
14 changes: 3 additions & 11 deletions footprints/settings_production.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import sys
from django.conf import settings
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
from ctlsettings.production import common
from ctlsettings.production import common, init_sentry

from footprints.settings_shared import * # noqa F403

Expand Down Expand Up @@ -35,10 +32,5 @@
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
16 changes: 4 additions & 12 deletions footprints/settings_staging.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import sys
from django.conf import settings
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
from ctlsettings.staging import common
from ctlsettings.staging import common, init_sentry

from footprints.settings_shared import * # noqa F403

Expand Down Expand Up @@ -33,11 +30,6 @@
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
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ python-dateutil==2.9.0
requirements/src/edtf-0.9.3ctl-py2.py3-none-any.whl

django-storages==1.14.2
ctlsettings==0.3.2
ctlsettings==0.3.4
funcsigs==1.0.2
pbr==6.0.0
django-s3sign<=0.2.1
Expand Down

0 comments on commit 33eb482

Please sign in to comment.