archivebox.workers.supervisord_util
Module Contents
Functions
Check if a port is already in use. |
|
Get the path to the supervisord socket file, symlinking to a shorter path if needed due to unix path length limits |
|
Yield each line from a file as they are written.
|
|
Create a supervisord worker config file for a given daemon |
|
Poll for supervisord readiness without a fixed startup sleep. |
|
Tail multiple log files simultaneously, interleaving their output. |
|
loop continuously and monitor worker’s health |
|
Data
API
- archivebox.workers.supervisord_util.RUNSERVER_WORKER(host: str, port: str, *, reload: bool, pidfile: str | None = None, nothreading: bool = False)[source]
- archivebox.workers.supervisord_util.is_port_in_use(host: str, port: int) bool[source]
Check if a port is already in use.
- archivebox.workers.supervisord_util.get_sock_file()[source]
Get the path to the supervisord socket file, symlinking to a shorter path if needed due to unix path length limits
- archivebox.workers.supervisord_util.follow(file, sleep_sec=0.1) collections.abc.Iterator[str][source]
Yield each line from a file as they are written.
sleep_secis the time to sleep after empty reads.
- archivebox.workers.supervisord_util.create_worker_config(daemon)[source]
Create a supervisord worker config file for a given daemon
- archivebox.workers.supervisord_util.wait_for_supervisord_ready(max_wait_sec: float = 5.0, interval_sec: float = 0.1)[source]
Poll for supervisord readiness without a fixed startup sleep.
- archivebox.workers.supervisord_util.tail_multiple_worker_logs(log_files: list[str], follow=True, proc=None)[source]
Tail multiple log files simultaneously, interleaving their output.
Args: log_files: List of log file paths to tail follow: Whether to keep following (True) or just read existing content (False) proc: Optional subprocess.Popen object - stop tailing when this process exits
- archivebox.workers.supervisord_util.watch_worker(supervisor, daemon_name, interval=5)[source]
loop continuously and monitor worker’s health