Revert "Quick synchronizations (for 'quick' > 0) are now performed between full synchronizations (as specified in the documentation)."
This reverts commit 220db8a77d.
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:
		| @@ -109,7 +109,6 @@ class Account(CustomConfig.ConfigHelperMixin): | ||||
|         self.localeval = config.getlocaleval() | ||||
|         self.ui = UIBase.getglobalui() | ||||
|         self.refreshperiod = self.getconffloat('autorefresh', 0.0) | ||||
|         self.quickrefreshcount = self.getconfint('quick', 0) | ||||
|         self.quicknum = 0 | ||||
|         if self.refreshperiod == 0.0: | ||||
|             self.refreshperiod = None | ||||
| @@ -145,11 +144,8 @@ class Account(CustomConfig.ConfigHelperMixin): | ||||
|  | ||||
|         for item in kaobjs: | ||||
|             item.startkeepalive() | ||||
|  | ||||
|         sleeptime = int(self.refreshperiod * 60) | ||||
|         if (self.quickrefreshcount > 0): | ||||
|             sleeptime = int(sleeptime / self.quickrefreshcount) | ||||
|  | ||||
|          | ||||
|         refreshperiod = int(self.refreshperiod * 60) | ||||
| #         try: | ||||
| #             sleepresult = siglistener.get_nowait() | ||||
| #             # 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 | ||||
| #                 pass | ||||
| #         except Empty: | ||||
| #             sleepresult = self.ui.sleep(sleeptime, siglistener) | ||||
|         sleepresult = self.ui.sleep(sleeptime, siglistener) | ||||
| #             sleepresult = self.ui.sleep(refreshperiod, siglistener) | ||||
|         sleepresult = self.ui.sleep(refreshperiod, siglistener) | ||||
|         if sleepresult == 1: | ||||
|             self.quicknum = 0 | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 John Goerzen
					John Goerzen