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

how to check who is leader #1

Open
hechain opened this issue Dec 20, 2019 · 1 comment
Open

how to check who is leader #1

hechain opened this issue Dec 20, 2019 · 1 comment

Comments

@hechain
Copy link

hechain commented Dec 20, 2019

Hi olomix,I have the same idea,when the node is leader,it can do someting,how to know which node is the leader?

@olomix
Copy link
Owner

olomix commented Apr 25, 2020

The library was designed to run specific jobs only on leader. For example, if you need to do some database cleanup on database, only one instance should do this. Perform such operations in parallel from few instances would be an error.

Why do your need to know who is the leader? If I understand the requirements, may be it will be possible to extend api.

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

No branches or pull requests

2 participants