Set maxconnections default to 2

Multithreading speeds up account syncing a lot and the offlineimap
defaults are very conservative. Let's make it use 2 IMAP connections by
default to gain some of the benefits that offlineimap offers.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Sebastian Spaeth 2011-03-06 10:20:14 +01:00 committed by Nicolas Sebrecht
parent 2ab51e6855
commit c44e94d64a
2 changed files with 6 additions and 4 deletions

View File

@ -341,7 +341,7 @@ remoteuser = username
# cases, it may slow things down. The safe answer is 1. You should
# probably never set it to a value more than 5.
maxconnections = 1
maxconnections = 2
# OfflineIMAP normally closes IMAP server connections between refreshes if
# the global option autorefresh is specified. If you wish it to keep the

View File

@ -295,8 +295,9 @@ class OfflineImap:
remoterepos = None
localrepos = None
threadutil.initInstanceLimit("ACCOUNTLIMIT",
config.getdefaultint("general", "maxsyncaccounts", 1))
threadutil.initInstanceLimit('ACCOUNTLIMIT',
config.getdefaultint('general',
'maxsyncaccounts', 1))
for reposname in config.getsectionlist('Repository'):
for instancename in ["FOLDER_" + reposname,
@ -305,7 +306,8 @@ class OfflineImap:
threadutil.initInstanceLimit(instancename, 1)
else:
threadutil.initInstanceLimit(instancename,
config.getdefaultint('Repository ' + reposname, "maxconnections", 1))
config.getdefaultint('Repository ' + reposname,
'maxconnections', 2))
siglisteners = []
def sig_handler(signum, frame):
if signum == signal.SIGUSR1: