mirror of
https://github.com/frappe/gunicorn.git
synced 2026-07-01 10:11:30 +08:00
Run the companion manager as a single arbiter child with its own supervision loop, and host the config model with its loader. config.py holds CompanionConfig (moved from process.py) and build_companion_configs(cfg), which expands each companion_workers entry into a CompanionConfig, filling omitted fields from the global companion_* settings. It is also the reread config_loader. process.py keeps State and CompanionProcess. CompanionManager.run() is the forked-child body: installs SIGCHLD/SIGTERM/SIGINT via a self-pipe, brings up the control socket, starts every companion, then select-waits on the socket and the pipe. Each tick reaps exits, retries backoff, promotes past startsecs, and SIGKILLs companions past their stop deadline. SIGTERM/SIGINT stop all companions and return. Arbiter gains companion_manager_pid, manage_companion_manager (respawns the manager when it is gone and companions are configured), spawn_companion_manager (fork; child runs the loop), and reap detection that clears the pid on exit. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Generate Documentation
======================
Requirements
------------
To generate documentation you need to install:
- Python >= 3.7
- Sphinx (https://www.sphinx-doc.org/)
Generate html
-------------
::
$ make html
The command generates html document inside ``build/html`` dir.