@instrumented_task(name='sentry.tasks.check_auth', queue='auth')
def check_auth(**kwargs):
 now = timezone.now()
 cutoff = (now - timedelta(seconds=AUTH_CHECK_INTERVAL))
 identity_list = list(AuthIdentity.objects.filter(last_synced__lte=cutoff))
 AuthIdentity.objects.filter(id__in=[i.id for i in identity_list]).update(last_synced=now)
 for identity in identity_list:
  check_auth_identity.apply_async(kwargs={'auth_identity_id': identity.id}, expires=AUTH_CHECK_INTERVAL)

@ instrumented_task ( name = 'sentry.tasks.check_auth' , queue = 'auth' ) def check_auth ( ** kwargs ) : now = timezone . now ( ) cutoff = ( now - timedelta ( seconds = AUTH_CHECK_INTERVAL ) ) identity_list = list ( AuthIdentity . objects . filter ( last_synced__lte = cutoff ) ) AuthIdentity . objects . filter ( id__in = [ i . id for i in identity_list ] ) . update ( last_synced = now ) for identity in identity_list : check_auth_identity . apply_async ( kwargs = { 'auth_identity_id' : identity . id } , expires = AUTH_CHECK_INTERVAL )
if an authorization header contains credentials .