Post sync hook only if something was changed?
Vladimir.Marek at Oracle.COM
Wed Jul 13 11:25:08 BST 2011
The postsynchook currently runs every time all folders has been
processed, no matter if there was or was not any change.
I would like to have a way to run the hook only if there was a change,
because I am synchronizing the maildirs to a zip file. That is
unnecessary and time consuming if there's no change.
I can see several possibilities:
- make it configurable, that post sync hook runs only if there's change
- make postsynchook_changed in addition to postsynchook
- move the logic to the hook program itself; export some environment
variable telling if there was any change ?
I can again try to implement that, but first would be good to know if
there's interest for this and which way would be preferred.
Also I don't know what is the 'usual' way of communicating between the
main thread and worker threads in python. Maybe pass some common object
to each worker thread and then have each worker thread update the status
once it finishes it's job?
More information about the OfflineIMAP-project