summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kolabd/process.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/kolabd/process.py b/kolabd/process.py
index 6578151..659b74f 100644
--- a/kolabd/process.py
+++ b/kolabd/process.py
@@ -38,11 +38,19 @@ class KolabdProcess(multiprocessing.Process):
)
def synchronize(self, domain):
+ sync_interval = conf.get('kolab', 'sync_interval')
+
+ if sync_interval == None or sync_interval == 0:
+ sync_interval = 300
+ else:
+ sync_interval = (int)(sync_interval)
+
while True:
try:
auth = Auth(domain)
auth.connect(domain)
auth.synchronize()
+ time.sleep(sync_interval)
except KeyboardInterrupt:
break
except Exception, errmsg: