barman.process module#
- class barman.process.ProcessInfo(pid, server_name, task)View on GitHub#
Bases:
object
Barman process representation
- __init__(pid, server_name, task)View on GitHub#
This object contains all the information required to identify a barman process
- Parameters:
pid (int) – Process ID
server_name (string) – Name of the server owning the process
task (string) – Task name (receive-wal, archive-wal…)
- class barman.process.ProcessManager(config)View on GitHub#
Bases:
object
Class for the management of barman processes owned by a server
- TASKS = {'receive-wal': <class 'barman.lockfile.ServerWalReceiveLock'>}#
- __init__(config)View on GitHub#
Build a ProcessManager for the provided server
- Parameters:
config – configuration of the server owning the process manager
- kill(process_info, retries=10)View on GitHub#
Kill a process
Returns True if killed successfully False otherwise
- Parameters:
process_info (ProcessInfo) – representation of the process we want to kill
retries (int) – number of times the method will check if the process is still alive
- Return type:
- list(task_filter=None)View on GitHub#
Returns a list of processes owned by this server
If no filter is provided, all the processes are returned.
- Parameters:
task_filter (str) – Type of process we want to retrieve
- Return list[ProcessInfo]:
List of processes for the server