sources/ldap: made ldap_sync_single calls from ldap_sync_all asynchronous (#6862)

This commit is contained in:
Alissa Gerhard 2023-10-16 13:11:34 +02:00 committed by GitHub
parent 07b8c5bc7a
commit 00b2a773b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,7 +32,7 @@ CACHE_KEY_PREFIX = "goauthentik.io/sources/ldap/page/"
def ldap_sync_all():
"""Sync all sources"""
for source in LDAPSource.objects.filter(enabled=True):
ldap_sync_single(source.pk)
ldap_sync_single.apply_async(args=[source.pk])
@CELERY_APP.task(