Execute pre/post hooks for IDLE-toggled syncs
Make IDLE syncs be equal to the regular synchronisations in respect to pre-sync and post-sync hooks. From: mxgr7 <maxgerer@gmail.com> Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
This commit is contained in:
parent
67d68c2fc8
commit
0d992ee7d3
@ -18,7 +18,8 @@ WIP (add new stuff for the next release)
|
||||
OfflineIMAP v6.5.5-rc1 (2012-09-05)
|
||||
===================================
|
||||
|
||||
* Bump version number
|
||||
* Execute pre/post-sync hooks during synchronizations
|
||||
toggled by IMAP IDLE message processing. (maxgerer@gmail.com)
|
||||
|
||||
OfflineIMAP v6.5.5-rc1 (2012-09-05)
|
||||
===================================
|
||||
|
@ -507,7 +507,13 @@ class IdleThread(object):
|
||||
remoterepos = account.remoterepos
|
||||
statusrepos = account.statusrepos
|
||||
remotefolder = remoterepos.getfolder(self.folder)
|
||||
|
||||
hook = account.getconf('presynchook', '')
|
||||
account.callhook(hook)
|
||||
offlineimap.accounts.syncfolder(account, remotefolder, quick=False)
|
||||
hook = account.getconf('postsynchook', '')
|
||||
account.callhook(hook)
|
||||
|
||||
ui = getglobalui()
|
||||
ui.unregisterthread(currentThread()) #syncfolder registered the thread
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user