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

Optionally provide a callback in apply_changeset #175

Open
wonder-sk opened this issue Jun 15, 2022 · 1 comment
Open

Optionally provide a callback in apply_changeset #175

wonder-sk opened this issue Jun 15, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@wonder-sk
Copy link
Contributor

Sometimes it is useful to be able to provide a callback function when applying changes - especially if the input diff file contains many changes. The callback could do things like

  • report progress of the operation to the user
  • allow early cancellation if the client is impatient
  • on server side, yield to indicate that the worker is doing work (did not freeze and should not get killed)

The callback could be something like this:

bool callback(geodiff_context, caller_context, progress);

... and apply_changeset would call it every now and then (not necessarily after each statement it applies).

Should be also supported in python API.

@wonder-sk wonder-sk added the enhancement New feature or request label Jun 15, 2022
@PeterPetrik
Copy link
Contributor

also possible useful for other function e.g. changeset creation

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

No branches or pull requests

2 participants