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

[DOC] Improve connection status and agent status callbacks use cases #11

Open
lupodellasleppa opened this issue Jul 26, 2021 · 1 comment

Comments

@lupodellasleppa
Copy link

When the SDK initializes, it gives no feedback as to if the start() has completed or not.

This could lead to third party applications considering the SDK as started, while in reality it's still starting.

It could happen, for example, that the SDK has not yet received the agent version from the agent, while trying to call the call_agent() method, resulting in a InvalidAgentVersion error.

@lupodellasleppa
Copy link
Author

In my use case I solved it by defining two attributes in my class, one for each agent started status and connection status.

So in both the methods on_agent_started_change and on_connection_status_changed I set these two attributes.

In my case I used threading.Event() for the attributes so i can just return agent_started.wait() and connection.wait() in my start function, but it surely can be done without the use of Event()s

I'm leaving the issue open to mark a missing highlight in the use of these methods in the doc.

@lupodellasleppa lupodellasleppa changed the title No feedback for successful start [DOC] Improve connection status and agent status callbacks use cases Jul 28, 2021
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

1 participant