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

Add support for user sync custom handlers #3385

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

tcibinan
Copy link
Contributor

Relates #2197.

The pull request brings support for user sync reusability via custom user handlers.

Example

from scripts.sync_users import get_daemon, UserHandler

class CustomUserHandler(UserHandler):

    def __init__(self):
        self._executor = None
        self._logger = None

    def register(self, executor, logger):
        self._executor = executor
        self._logger = logger

    def create(self, users):
        self._logger.debug('Creating users...')

sync_daemon = get_daemon()
sync_daemon.register(CustomUserHandler())
sync_daemon.sync()

@tcibinan tcibinan marked this pull request as ready for review October 12, 2023 10:36
@tcibinan tcibinan requested a review from mzueva October 12, 2023 10:36
@tcibinan tcibinan merged commit 43cde6f into develop Oct 18, 2023
4 checks passed
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.

2 participants