Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

13 rader
450 B

  1. # -*- coding: utf-8 -*-
  2. from __future__ import (absolute_import, division, print_function,
  3. unicode_literals)
  4. def register_sentry(sentry_dsn):
  5. """Given a Raven client and an RQ worker, registers exception handlers
  6. with the worker so exceptions are logged to Sentry.
  7. """
  8. import sentry_sdk
  9. from sentry_sdk.integrations.rq import RqIntegration
  10. sentry_sdk.init(sentry_dsn, integrations=[RqIntegration()])