Quick synchronizations (for 'quick' > 0) are now performed between full synchronizations (as specified in the documentation).
Hello John,
 The attached patch makes quick synchronization work again (according to
 the documentation), so there are <quick> quick synchronizations
 performed between full synchronizations.
 Thanks,
        Michal
			
			
This commit is contained in:
		
				
					committed by
					
						
						John Goerzen
					
				
			
			
				
	
			
			
			
						parent
						
							dd351a2465
						
					
				
				
					commit
					220db8a77d
				
			@@ -109,6 +109,7 @@ 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
 | 
			
		||||
@@ -144,8 +145,11 @@ class Account(CustomConfig.ConfigHelperMixin):
 | 
			
		||||
 | 
			
		||||
        for item in kaobjs:
 | 
			
		||||
            item.startkeepalive()
 | 
			
		||||
        
 | 
			
		||||
        refreshperiod = int(self.refreshperiod * 60)
 | 
			
		||||
 | 
			
		||||
        sleeptime = int(self.refreshperiod * 60)
 | 
			
		||||
        if (self.quickrefreshcount > 0):
 | 
			
		||||
            sleeptime = int(sleeptime / self.quickrefreshcount)
 | 
			
		||||
 | 
			
		||||
#         try:
 | 
			
		||||
#             sleepresult = siglistener.get_nowait()
 | 
			
		||||
#             # retrieved signal before sleep started
 | 
			
		||||
@@ -153,8 +157,8 @@ class Account(CustomConfig.ConfigHelperMixin):
 | 
			
		||||
#                 # catching signal 1 here means folders were cleared before signal was posted
 | 
			
		||||
#                 pass
 | 
			
		||||
#         except Empty:
 | 
			
		||||
#             sleepresult = self.ui.sleep(refreshperiod, siglistener)
 | 
			
		||||
        sleepresult = self.ui.sleep(refreshperiod, siglistener)
 | 
			
		||||
#             sleepresult = self.ui.sleep(sleeptime, siglistener)
 | 
			
		||||
        sleepresult = self.ui.sleep(sleeptime, siglistener)
 | 
			
		||||
        if sleepresult == 1:
 | 
			
		||||
            self.quicknum = 0
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user