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) bool | None

This method must be executed only when the _lock is acquired

class patroni.postgresql.cancellable.CancellableSubprocess

Bases: CancellableExecutor

__init__() None
call(*args: Any, **kwargs: Any) int | None
cancel(kill: bool = False) None
property is_cancelled: bool
reset_is_cancelled() None