summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/kolab.conf4
-rw-r--r--kolabd/__init__.py6
-rw-r--r--pykolab/conf/defaults.py3
3 files changed, 12 insertions, 1 deletions
diff --git a/conf/kolab.conf b/conf/kolab.conf
index 80d1f53..654c38e 100644
--- a/conf/kolab.conf
+++ b/conf/kolab.conf
@@ -22,6 +22,10 @@ default_locale = en_US
; deployments that lack persistent search and syncrepl ldap controls.
sync_interval = 300
+; Synchronization interval for domains - describes the number of seconds
+; to wait in between polls for new and deleted domain name spaces.
+domain_sync_interval = 600
+
; The policy to use when originally composing the uid attribute value.
; Normally '%(surname)s.lower()', the transliterated value of the 'sn',
; in all lower-case.
diff --git a/kolabd/__init__.py b/kolabd/__init__.py
index 54905f6..92a929c 100644
--- a/kolabd/__init__.py
+++ b/kolabd/__init__.py
@@ -269,7 +269,11 @@ class KolabDaemon(object):
added_domains.append(domain)
if len(removed_domains) == 0 and len(added_domains) == 0:
- time.sleep(600)
+ try:
+ sleep_between_domain_operations_in_seconds = (float)(conf.get('kolab', 'domain_sync_interval'))
+ time.sleep(sleep_between_domain_operations_in_seconds)
+ except ValueError:
+ time.sleep(600)
log.debug(
_("added domains: %r, removed domains: %r") % (
diff --git a/pykolab/conf/defaults.py b/pykolab/conf/defaults.py
index 56abe6c..06e5372 100644
--- a/pykolab/conf/defaults.py
+++ b/pykolab/conf/defaults.py
@@ -33,5 +33,8 @@ class Defaults(object):
self.mail_attributes = ['mail', 'alias']
self.mailserver_attribute = 'mailhost'
+ # when you want a new domain to be added in a short time, you should reduce this value to 10 seconds
+ self.kolab_domain_sync_interval = 600
+
self.kolab_default_locale = 'en_US'
self.ldap_unique_attribute = 'nsuniqueid' \ No newline at end of file