Skip to content

first version of non-polling scone

Emilio Meschi requested to merge emilioNonPollingLoops into main

This merge request addresses issue #36 (closed) by replacing the non-blocking loop constantly cheking if a read or write request is in the queues. The read and write request and response queue pairs are replaced by a single pair. The loop blocks on a q_request.get and requests are appropriately routed, when the call returns, by checking if they contain a "value" field. The Flask server code then blocks on a q_response.get with a timeout of 10s. The timeout is appropriately handled by providing a response with an error code. To reduce the verbosity of the log, a "--verbosity" (-v) parameter is added, with a default of 0 (only ERROR messages are propagated. This is arguable but silences the Flask component from logging every single GET or POST. The rpm was tested on cmd-scouting-ctrlhub using the web interface. The prometheus part of the code should not be affected in any way.

Merge request reports