goauthentik / authentik

The authentication glue you need.
https://goauthentik.io
Other
12.54k stars 843 forks source link

Don't schedule an LDAP sync (ldap_sync_all) while it's still running #6810

Open a-gerhard opened 12 months ago

a-gerhard commented 12 months ago

Is your feature request related to a problem? Please describe. I have a longer-running synchronization process (more than 10 hours), and a new synchronization task is triggered every two hours. This slows down the other sync processes significantly, and may make the server to close existing connections.

Describe the solution you'd like Only schedule ldap_sync_all if there is no other ldap_sync_all task running. Even better would be to make this decision per source.

Describe alternatives you've considered

BeryJu commented 1 month ago

While multiple syncs can still be scheduled, no multiple syncs will be run since #7263

In addition you can set this flag to disable celery beat on everything but one worker: https://github.com/goauthentik/authentik/blob/main/authentik/core/management/commands/worker.py#L20-L26