From 7a2de6e118b1b88a34efa87cbd27f398a690c717 Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Kolab Systems)" Date: Wed, 26 Dec 2012 15:37:53 +0100 Subject: Loop through the thread's synchronization routine continuously --- kolabd/process.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'kolabd') 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() -- cgit v1.1