Skip to content

Commit

Permalink
Merge pull request #4732 from hypothesis/fix-double-reporting
Browse files Browse the repository at this point in the history
Fix double-reporting of DB session warning to Sentry
  • Loading branch information
robertknight authored Jan 8, 2018
2 parents 40213d9 + 133ca81 commit bcae58f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions h/db/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ def _session(request):
def close_the_sqlalchemy_session(request):
changes = tracker.uncommitted_changes() if tracker else []
if changes:
msg = 'closing a session with uncommitted changes'
request.sentry.captureMessage(msg, stack=True, extra={
msg = 'closing a session with uncommitted changes %s'
log.warn(msg, changes, extra={
'stack': True,
'changes': changes,
})
log.warn('{} {}'.format(msg, changes))
session.close()

return session
Expand Down

0 comments on commit bcae58f

Please sign in to comment.