Modernise prserv startup & request handling
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | prserv: Use multiprocessing to auto start prserverlib/ | +8 | 0 replies | |
| 2/4 | prserv: Extract daemonization from PRServer classlib/ | +72 | 0 replies | |
| 3/4 | prserv: Handle requests in main threadlib/ | +36 | 0 replies | |
| 4/4 | prserv: Add 15s timeout to auto shutdownlib/ | +3 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] Modernise prserv startup & request handling
These patches continue the preparation of the prserv code for the update to a json-based asyncrpc system.
When the prservice process is auto-started by bitbake we can make use of the Python multiprocessing module to simplify startup and shutdown. When running as a daemon via bitbake-prserv we still need to do the double-fork dance but this is extracted from the PRServer class into a new run_as_daemon function to simplify further changes. Since prservice requests are already handled in a dedicated process we don't need to also have a separate handling thread.
These changes are basically equivalent to those submitted in the previous RFC series but with an additional patch to add a timeout when automatically shutting down the prservice process. Hopefully this will prevent bitbake from hanging during testing.
I've ran these changes through both bitbake-selftest and oe-selftest -a and all looks good on my end. A couple of failures were seen in oe-selftest but these are related to my host system configuration (socat not installed, firewall blocking ports, etc) so I'm fairly confident they aren't caused by this patch series.
Paul Barker (4):
prserv: Use multiprocessing to auto start prserver
prserv: Extract daemonization from PRServer class
prserv: Handle requests in main thread
prserv: Add 15s timeout to auto shutdown
lib/prserv/serv.py | 338 +++++++++++++++------------------------------ 1 file changed, 113 insertions(+), 225 deletions(-)
Signature · 1 line
2.26.2