summaryrefslogtreecommitdiffstats
path: root/kolabd
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-12-26 15:37:53 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-12-26 15:37:53 +0100
commit7a2de6e118b1b88a34efa87cbd27f398a690c717 (patch)
treea561e044ae6333dffed340dcc32af9bc2f66a0a0 /kolabd
parent02a5f7f9eb5e62a0e1498e151c6e9dd968aec6fd (diff)
downloadpykolab-7a2de6e118b1b88a34efa87cbd27f398a690c717.tar.gz
Loop through the thread's synchronization routine continuously
Diffstat (limited to 'kolabd')
-rw-r--r--kolabd/process.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/kolabd/process.py b/kolabd/process.py
index c936fdc..f5f5352 100644
--- a/kolabd/process.py
+++ b/kolabd/process.py
@@ -17,6 +17,7 @@
#
import multiprocessing
+import os
import time
import pykolab
@@ -37,12 +38,12 @@ class KolabdProcess(multiprocessing.Process):
)
def synchronize(self, domain):
- try:
- auth = Auth(domain)
- auth.connect(domain)
- auth.synchronize()
- except Exception, errmsg:
- log.error(_("Error in process %r, terminating:\n\t%r") % (self.name, errmsg))
- import traceback
- traceback.print_exc()
- return
+ while True:
+ try:
+ auth = Auth(domain)
+ auth.connect(domain)
+ auth.synchronize()
+ except Exception, errmsg:
+ log.error(_("Error in process %r, terminating:\n\t%r") % (self.name, errmsg))
+ import traceback
+ traceback.print_exc()