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

Automatic reconnect option #17

Open
nmaas87 opened this issue Oct 18, 2021 · 2 comments
Open

Automatic reconnect option #17

nmaas87 opened this issue Oct 18, 2021 · 2 comments

Comments

@nmaas87
Copy link

nmaas87 commented Oct 18, 2021

It would be awesome to have an automatic reconnect option in the Python API, so that it can automatically reconnect if it loses connection, e.g. when someone restarts the Yamcs Server for an MDB update or debugging.

@nmaas87 nmaas87 changed the title Automatic reconnection option Automatic reconnect option Oct 18, 2021
@nmaas87
Copy link
Author

nmaas87 commented Oct 22, 2021

This should also entail automatic re-subscription to parameters, etc

fqqb added a commit that referenced this issue Mar 16, 2023
@fqqb
Copy link
Member

fqqb commented Mar 17, 2023

Published an example on how to do parameter subscription combined with reconnection: https://docs.yamcs.org/python-yamcs-client/examples/reconnection/

The issue asks for a built-in option (for example a ParameterSubscription object which can automatically restore), which I'm not against, but is still a few steps away (1/ auth sessions are not restored when Yamcs restarts. 2/ maybe better to use a shared WebSocket for all subscriptions). The example shows how to achieve reconnection by manually tracking the lifetime of a single subscription and recreating the client entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants