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

Allow subscription to changes of object matching a Query #104

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

kofrezo
Copy link
Contributor

@kofrezo kofrezo commented Jun 24, 2020

This PR from @hasegeli aims to make it possible to subscribe to changes of objects matching a custom Query using the adminapi module. One can use the subscribe_changes method to register a callback to act on changes.

Example Usage:

>>> from adminapi.dataset import Query
>>>
>>> to_observe = Query({'responsible_admin': 'john.doe'})
>>> to_observe.subscribe_changes(lambda commit: print('Something changed {}'.format(commit))

Besides the age of the PR this is a great feature and it comes already with some improvements to the history which we aim for on the long term.

@kofrezo kofrezo marked this pull request as draft June 25, 2020 14:09
@TheFRedFox TheFRedFox marked this pull request as ready for review July 21, 2021 10:49
@TheFRedFox TheFRedFox marked this pull request as draft July 21, 2021 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants