chore: add documentation RI
Code functionality left unchanged, only added docs where missing close: N25B-298
This commit is contained in:
@@ -57,6 +57,13 @@ def main_loop(context):
|
||||
continue
|
||||
|
||||
def overtime_callback(time_ms):
|
||||
"""
|
||||
A callback function executed by TimeBlock if the message handling
|
||||
exceeds the allowed time limit.
|
||||
|
||||
:param time_ms: The elapsed time, in milliseconds, that the block took.
|
||||
:type time_ms: float
|
||||
"""
|
||||
logging.warn("Endpoint \"%s\" took too long (%.2f ms) on the main thread.",
|
||||
message["endpoint"], time_ms)
|
||||
|
||||
@@ -68,6 +75,12 @@ def main_loop(context):
|
||||
|
||||
|
||||
def main():
|
||||
"""
|
||||
Initializes the ZeroMQ context and the application state.
|
||||
It executes the main event loop (`main_loop`) and ensures that both the
|
||||
application state and the ZeroMQ context are properly cleaned up (deinitialized/terminated)
|
||||
upon exit, including handling a KeyboardInterrupt.
|
||||
"""
|
||||
context = zmq.Context()
|
||||
|
||||
state.initialize()
|
||||
|
||||
Reference in New Issue
Block a user