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

[Platform] Add drain callback #57

Merged
merged 2 commits into from
Dec 7, 2023
Merged

Conversation

rokatyy
Copy link
Contributor

@rokatyy rokatyy commented Dec 6, 2023

Currently a user can set a termination callback, which the processor invokes right before terminating.
An option to set a new callback for draining, which will be invoked on rebalancing, is needed.

The functionality is the same as the termination callback - user can set a drain callback using set_drain_callback(callback) in the Platform class.

Also, an argument callback_type was added to _on_signal so that the platform will know which callback to invoke - the termination callback or the drain callback.

https://jira.iguazeng.com/browse/NUC-108

@rokatyy rokatyy marked this pull request as ready for review December 6, 2023 17:52
Copy link
Contributor

@TomerShor TomerShor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@TomerShor TomerShor merged commit 55c20f6 into nuclio:development Dec 7, 2023
7 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