Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

13 righe
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()])