Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post- and presync hooks for quick and full syncs #702

Open
dopefishh opened this issue Sep 1, 2021 · 2 comments
Open

post- and presync hooks for quick and full syncs #702

dopefishh opened this issue Sep 1, 2021 · 2 comments
Labels

Comments

@dopefishh
Copy link
Contributor

The postsynchook and presynchook are configuration options to execute a process before of after synchronisation.

In my case it would be useful to discriminate between quick syncs and full syncs in regards to post- and presynchooks. My postsynchook is quite CPU intensive and I would like to only run it on full syncs and skip it on quick syncs.

To keep it backwards compatible I propose to add four new configuration options so that there are a total of six synchooks:

  • presynchook
    Executes before both a quick and a full sync
  • postsynchook
    Executes after both a quick and a full sync
  • prequicksynchook
    Executes only before a quick sync
  • postquicksynchook
    Executes only after a quick sync
  • prefullsynchook
    Executes only before a full sync
  • postfullsynchook
    Executes only after a full sync

I'm fine with implementing this but I wanted to poll enthusiasm first.

@nicolas33
Copy link
Member

I'd merge patches. You might like to contribute to offlineimap3, though.

@nicolas33
Copy link
Member

BTW, I think the best way to implement this is not to introduce yet another configuration option. I'd rather add a new "context" argument object when calling the user function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants