Revert "Quick synchronizations (for 'quick' > 0) are now performed between full synchronizations (as specified in the documentation)."
This reverts commit 220db8a77db69c6153ac1de9ac8f014c911e6829. From: Daniel Jacobowitz Date: July 17, 2009 The documentation may have been unclear, but quick never worked the way this patch changes it. My installed offlineimap does one sync every $autorefresh minutes, and the $quick'th one is a full sync. All the others are quick. Now it's going to do a full sync every $autorefresh minutes and a ludicrous number of $quick syncs. -- Daniel Jacobowitz CodeSourcery
This commit is contained in:
parent
312b91a1a5
commit
a3a0a68163
@ -109,7 +109,6 @@ class Account(CustomConfig.ConfigHelperMixin):
|
|||||||
self.localeval = config.getlocaleval()
|
self.localeval = config.getlocaleval()
|
||||||
self.ui = UIBase.getglobalui()
|
self.ui = UIBase.getglobalui()
|
||||||
self.refreshperiod = self.getconffloat('autorefresh', 0.0)
|
self.refreshperiod = self.getconffloat('autorefresh', 0.0)
|
||||||
self.quickrefreshcount = self.getconfint('quick', 0)
|
|
||||||
self.quicknum = 0
|
self.quicknum = 0
|
||||||
if self.refreshperiod == 0.0:
|
if self.refreshperiod == 0.0:
|
||||||
self.refreshperiod = None
|
self.refreshperiod = None
|
||||||
@ -146,10 +145,7 @@ class Account(CustomConfig.ConfigHelperMixin):
|
|||||||
for item in kaobjs:
|
for item in kaobjs:
|
||||||
item.startkeepalive()
|
item.startkeepalive()
|
||||||
|
|
||||||
sleeptime = int(self.refreshperiod * 60)
|
refreshperiod = int(self.refreshperiod * 60)
|
||||||
if (self.quickrefreshcount > 0):
|
|
||||||
sleeptime = int(sleeptime / self.quickrefreshcount)
|
|
||||||
|
|
||||||
# try:
|
# try:
|
||||||
# sleepresult = siglistener.get_nowait()
|
# sleepresult = siglistener.get_nowait()
|
||||||
# # retrieved signal before sleep started
|
# # retrieved signal before sleep started
|
||||||
@ -157,8 +153,8 @@ class Account(CustomConfig.ConfigHelperMixin):
|
|||||||
# # catching signal 1 here means folders were cleared before signal was posted
|
# # catching signal 1 here means folders were cleared before signal was posted
|
||||||
# pass
|
# pass
|
||||||
# except Empty:
|
# except Empty:
|
||||||
# sleepresult = self.ui.sleep(sleeptime, siglistener)
|
# sleepresult = self.ui.sleep(refreshperiod, siglistener)
|
||||||
sleepresult = self.ui.sleep(sleeptime, siglistener)
|
sleepresult = self.ui.sleep(refreshperiod, siglistener)
|
||||||
if sleepresult == 1:
|
if sleepresult == 1:
|
||||||
self.quicknum = 0
|
self.quicknum = 0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user