def register_sentry(client, worker):
 def send_to_sentry(job, *exc_info):
  client.captureException(exc_info=exc_info, extra={u'job_id': job.id, u'func': job.func_name, u'args': job.args, u'kwargs': job.kwargs, u'description': job.description})
 worker.push_exc_handler(send_to_sentry)

def register_sentry ( client , worker ) : def send_to_sentry ( job , * exc_info ) : client . captureException ( exc_info = exc_info , extra = { u'job_id' : job . id , u'func' : job . func_name , u'args' : job . args , u'kwargs' : job . kwargs , u'description' : job . description } ) worker . push_exc_handler ( send_to_sentry )
given a raven client and an rq worker .