-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
worker.isOnline() ? #3294
Comments
BTW there is the worker.state property that is set to 'online' once the worker is online but it's not a documented feature |
In the example you posted an It might make sense if you have something in there that introduces a discontinuity, like |
Closing due to inactivity. |
I have a piece of code that needs to handle present and future workers once at any point during the application life time.
Here is a simple test case
This code outputs:
The intent of the piece of code is to execute something once for each present and future online worker. If we had a isOnline method and I could use it instead of isConnected the code would output:
Or maybe there is already a way around this?
This is definitively a minor issue/use case; I'm working around it by keeping a list of handled workers but it would be nice if I didn't had to.
Would isOnline be a good solution to the problem? If so I'd be happy to send a PR.
The text was updated successfully, but these errors were encountered: