patroni.postgresql.cancellable module

class patroni.postgresql.cancellable.CancellableExecutor

Bases: object

There must be only one such process so that AsyncExecutor can easily cancel it.

__init__() None
_kill_children() None
_kill_process() None
_start_process(cmd: List[str], *args: Any, **kwargs: Any) Optional[bool]

This method must be executed only when the _lock is acquired

class patroni.postgresql.cancellable.CancellableSubprocess

Bases: patroni.postgresql.cancellable.CancellableExecutor

__init__() None
call(*args: Any, **kwargs: Union[Any, Dict[str, str]]) Optional[int]
cancel(kill: bool = False) None
property is_cancelled: bool
reset_is_cancelled() None