@app.task(name='tasks.get_sentry_link', ignore_result=True, max_retries=6, bind=True)
def get_sentry_link(self, crash_pk, event_id):
    try:
        if SENTRY_DOMAIN and SENTRY_ORG_SLUG and SENTRY_PROJ_SLUG and SENTRY_API_KEY:
            crash = Crash.objects.get(pk=crash_pk)
            resp = requests.get(
                'http://%s/api/0/projects/%s/%s/events/%s/' % (SENTRY_DOMAIN, SENTRY_ORG_SLUG, SENTRY_PROJ_SLUG, event_id,),
                auth=(SENTRY_API_KEY, '')
            ).json()

            crash.groupid = resp['groupID']
            crash.eventid = resp['id']
            crash.save()
        else:
            logging.warning("Sentry is not congured")
    except __HOLE__ as exc:
        logging.error("Sentry event not found")
        raise self.retry(exc=exc, countdown=2 ** get_sentry_link.request.retries)
dataset/ETHPy150Open Crystalnix/omaha-server/omaha_server/crash/tasks.py/get_sentry_link