Skip to content

Commit

Permalink
minor cleanup (#812)
Browse files Browse the repository at this point in the history
* chore: only track PWA errors when DEBUG is on
* chore: remove trace statement
  • Loading branch information
dodumosu authored Jun 3, 2021
1 parent 6233c60 commit b62e47e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions apollo/pwa/static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ window.isUpdateAvailable = new Promise((resolve, reject) => {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/pwa/serviceworker.js', {scope: '/pwa/'})
.then(registration => {
console.log('service worker registered successfully with scope:', registration.scope);

registration.onupdatefound = () => {
const installingWorker = registration.installing;
installingWorker.onstatechange = () => {
Expand Down
2 changes: 1 addition & 1 deletion apollo/pwa/views_pwa.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def index():
else:
commit = 'unknown'

trace_errors = settings.TRACK_PWA_ERRORS
trace_errors = settings.DEBUG
sentry_dsn = settings.SENTRY_DSN or ''

context = {'commit': commit, 'trace_errors': trace_errors}
Expand Down
2 changes: 0 additions & 2 deletions apollo/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@

SENTRY_DSN = config('SENTRY_DSN', default=None)
SENTRY_USER_ATTRS = ['email']
TRACK_PWA_ERRORS = config(
'TRACK_PWA_ERRORS', cast=config.boolean, default=False)

MAIL_SERVER = config('MAIL_SERVER', default=None)
MAIL_PORT = config('MAIL_PORT', default=None)
Expand Down

0 comments on commit b62e47e

Please sign in to comment.