diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2014-01-26 16:24:16 +0100 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2014-01-26 16:24:55 +0100 |
commit | 647634e70b04f7c624bd0cfdea755b294d029f8c (patch) | |
tree | c870b8d040843693e620e7320dc12872f2efd8ed | |
parent | 582edb976ea0e6d3489cc9852347f278d51a1c68 (diff) | |
download | pykolab-647634e70b04f7c624bd0cfdea755b294d029f8c.tar.gz |
Pause between starting domain synchronizations if the number of domains added is greater or equal to 5, for otherwise you will hammer your LDAP server to death
-rw-r--r-- | kolabd/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kolabd/__init__.py b/kolabd/__init__.py index 34e54e7..3f43872 100644 --- a/kolabd/__init__.py +++ b/kolabd/__init__.py @@ -267,6 +267,9 @@ class KolabDaemon(object): for domain in added_domains: domain_auth[domain] = Process(domain) domain_auth[domain].start() + # Pause or hammer your LDAP server to death + if len(added_domains) >= 5: + time.sleep(10) for domain in removed_domains: domain_auth[domain].terminate() |