summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-09-23 16:03:02 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-09-23 16:03:02 +0100
commit10065c30df1fe22d111ea5ddd8648c9af06bd24a (patch)
treeb39ae8aa94a32be3d89d2a01c75b881267a3aaf4
parentbec94af8319f5343e57253bc69cf4a13c16ccde0 (diff)
downloadpykolab-10065c30df1fe22d111ea5ddd8648c9af06bd24a.tar.gz
Update kolabd synchronizing routine
-rw-r--r--kolabd/__init__.py18
1 files changed, 4 insertions, 14 deletions
diff --git a/kolabd/__init__.py b/kolabd/__init__.py
index e993009..3c161e2 100644
--- a/kolabd/__init__.py
+++ b/kolabd/__init__.py
@@ -107,9 +107,6 @@ class KolabDaemon(object):
else:
auth = Auth()
- # TODO: Interval should be configurable
- log.debug(_("Sleeping for 10 seconds..."), level=5)
- time.sleep(10)
log.debug(_("Listing domains..."), level=5)
start = time.time()
domains = auth.list_domains()
@@ -119,20 +116,13 @@ class KolabDaemon(object):
all_folders = []
for primary_domain,secondary_domains in domains:
- #print "Running for domain %s" %(primary_domain)
+ log.debug(_("Running for domain %s") %(primary_domain), level=5)
auth.connect(primary_domain)
start_time = time.time()
- users = auth.list_users(primary_domain, secondary_domains)
- #print "USERS RETURNED FROM auth.list_users():", users
+ auth.synchronize(primary_domain, secondary_domains)
end_time = time.time()
- log.info(_("Listing users for %s (including getting the" + \
- " appropriate attributes, took %d seconds")
+
+ log.info(_("Synchronizing users for %s took %d seconds")
%(primary_domain, (end_time-start_time))
)
- all_folders.extend(imap.synchronize(users, primary_domain, secondary_domains))
-
- imap.expunge_user_folders(all_folders)
- # Give up the memory
- del imap
- del auth