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

Review: Add Message Handler #12

Closed
wants to merge 4 commits into from
Closed

Conversation

BenediktBurger
Copy link
Member

The MessageHandler is the base for single threaded LECO components: It listens in a continuous loop to incoming messages and handles them.

  • It tries to sign-in whenever it is told, that it is not signed in.
  • It handles ping messages.
  • Designed for extension:
    • The continuous loop is divided in three parts: setup, loop-element, close, such that subclasses may change or expand these individual parts instead of writing everything again.
    • Message handling is divided in several steps, such that you can intervene, wherever needed.
    • You can add more methods to the rpc-server such that these messages are handled natively

The MessageHandler is an extended Component (with log level and shutdown).

As dependency, it needs the ZmqLogHandler, which is a logging Handler which publishes log messages via the data protocol (on the log ports).

@github-actions
Copy link

github-actions bot commented Oct 12, 2023

PyLECO Coverage

Coverage Report
FileStmtsMissCoverMissing
pyleco
   test.py612263%39, 42, 63, 66–67, 70, 76, 84, 96, 106–110, 113, 116, 119, 122–124, 127–128
pyleco/core
   internal_protocols.py12283%60, 70
pyleco/utils
   message_handler.py1752182%85–>88, 90–>89, 137–>139, 149–150, 184–188, 215–216, 217–>220, 249–250, 260–261, 264–267, 270–273, 301
   zmq_log_handler.py401162%63–64, 66–68, 70–72, 81–82, 85
TOTAL4475684% 

Coverage Summary

Tests Skipped Failures Errors Time
112 0 💤 0 ❌ 0 🔥 1.297s ⏱️

@BenediktBurger BenediktBurger marked this pull request as draft October 27, 2023 09:46
@BenediktBurger
Copy link
Member Author

As a review is not happening in foreseeable future, I make this PRs a draft.

Whenever someone has time to review, I'll push the most recent version.

Copy link

github-actions bot commented Jan 3, 2024

PyLECO Coverage

Coverage Report
FileStmtsMissCoverMissing
pyleco
   test.py1144755%39, 42, 64, 67, 70–71, 74, 80, 99, 103–108, 111–119, 136–>135, 156–160, 163, 166, 169, 172–174, 177, 180–181, 218–220, 223–226, 230–233
pyleco/core
   internal_protocols.py281342%72, 81, 87–90, 102–106, 110–114
pyleco/utils
   data_publisher.py38195%61
   zmq_log_handler.py35481%63, 65–>67, 69–71
TOTAL6166588% 

Coverage Summary

Tests Skipped Failures Errors Time
166 0 💤 0 ❌ 0 🔥 1.097s ⏱️

@BenediktBurger
Copy link
Member Author

BenediktBurger commented Jan 3, 2024

This PR is now includes the code of #17 as the logging entity uses data messages (it already used the data protocol but implemented it by itself).

Therefore the data_message and data_publisher, including their respective tests, are not part of this PR by itself.

@BenediktBurger BenediktBurger changed the base branch from main to reviewed January 29, 2024 14:00
@BenediktBurger BenediktBurger changed the title Add Message Handler Review: Add Message Handler Apr 10, 2024
@BenediktBurger
Copy link
Member Author

As it is unknown, when this will be reviewed: Closed.

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

Successfully merging this pull request may close these issues.

1 participant