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

Ensure graceful exit of the quickstart Python script and the How-to guide Python scripts #98

Closed
ognian-baruh opened this issue Aug 25, 2022 · 2 comments · Fixed by #111
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ognian-baruh
Copy link

Currently, the command response handlers of the Python scripts quit the process upon receival of a message, preventing themselves from gracefully exiting the on_message callback method. As a result the connection to the Eclipse Hono Sandbox is lost, preventing secondary execution of the scripts before reconnection.

The issue is raised to the Eclipse Hono project in this issue.

To temporary workaround the described issue the exit of the scripts could be done asynchronously - i.e. by using the on_connection_closed callback. This will ensure that the message processing will not be interrupted in any way so that the connection stays intact.

The affected Python scripts are:

@ognian-baruh ognian-baruh added the bug Something isn't working label Aug 25, 2022
@ognian-baruh ognian-baruh added this to the M2 milestone Aug 25, 2022
@ognian-baruh ognian-baruh moved this to Todo in Eclipse Kanto Aug 25, 2022
@ognian-baruh ognian-baruh self-assigned this Aug 26, 2022
@daniel-milchev
Copy link
Contributor

I'll have a look at this.

@konstantina-gramatova konstantina-gramatova moved this from Todo to In Progress in Eclipse Kanto Aug 29, 2022
daniel-milchev added a commit to bosch-io/kanto that referenced this issue Aug 31, 2022
…t and the How-to guide Python scripts

Fixed hono_commands.py

Signed-off-by: Daniel Milchev <[email protected]>
daniel-milchev added a commit to bosch-io/kanto that referenced this issue Aug 31, 2022
…pt and the How-to guide Python scripts

Fixed hono_commands_su.py

Signed-off-by: Daniel Milchev <[email protected]>
daniel-milchev added a commit to bosch-io/kanto that referenced this issue Sep 2, 2022
…pt and the How-to guide Python scripts

Fixed the issue in all scripts

Signed-off-by: Daniel Milchev <[email protected]>
@konstantina-gramatova konstantina-gramatova moved this from In Progress to Ready for Review in Eclipse Kanto Sep 2, 2022
daniel-milchev added a commit to bosch-io/kanto that referenced this issue Sep 2, 2022
…pt and the How-to guide Python scripts

Formatted the script

Signed-off-by: Daniel Milchev <[email protected]>
@konstantina-gramatova
Copy link
Contributor

The behavior in the AMQP handlers for Hono events is secured too regardless the described issue is not present there (as explained here). The workaround is added there as well for completeness and code consistency.

@konstantina-gramatova konstantina-gramatova moved this from Ready for Review to In Review in Eclipse Kanto Sep 8, 2022
konstantina-gramatova pushed a commit that referenced this issue Sep 8, 2022
…uide Python scripts (#111)

[#98] Ensure graceful exit of the quickstart Python script and the How-to guide Python scripts
Fixed the issue in all scripts

Signed-off-by: Daniel Milchev <[email protected]>
Repository owner moved this from In Review to Done in Eclipse Kanto Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
3 participants