From 74449c81ad6e6d5bb170b3113b6112fb91f6f445 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Fri, 11 Oct 2019 23:43:59 +0300 Subject: set --process-name-prefix --- kvmd/apps/__init__.py | 2 ++ kvmd/apps/kvmd/streamer.py | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'kvmd/apps') diff --git a/kvmd/apps/__init__.py b/kvmd/apps/__init__.py index c6f69fb2..bfb4263e 100644 --- a/kvmd/apps/__init__.py +++ b/kvmd/apps/__init__.py @@ -240,6 +240,8 @@ def _get_config_scheme() -> Dict: "unix": Option("", type=valid_abs_path, only_if="!port", unpack_as="unix_path"), "timeout": Option(2.0, type=valid_float_f01), + "process_name_prefix": Option("kvmd/streamer"), + "cmd": Option(["/bin/true"], type=valid_command), }, }, diff --git a/kvmd/apps/kvmd/streamer.py b/kvmd/apps/kvmd/streamer.py index 5a3ec0ee..b7f1826a 100644 --- a/kvmd/apps/kvmd/streamer.py +++ b/kvmd/apps/kvmd/streamer.py @@ -62,6 +62,8 @@ class Streamer: # pylint: disable=too-many-instance-attributes unix_path: str, timeout: float, + process_name_prefix: str, + cmd: List[str], ) -> None: @@ -86,6 +88,8 @@ class Streamer: # pylint: disable=too-many-instance-attributes self.__unix_path = unix_path self.__timeout = timeout + self.__process_name_prefix = process_name_prefix + self.__cmd = cmd self.__streamer_task: Optional[asyncio.Task] = None @@ -248,6 +252,7 @@ class Streamer: # pylint: disable=too-many-instance-attributes host=self.__host, port=self.__port, unix=self.__unix_path, + process_name_prefix=self.__process_name_prefix, **self.__params, ) for part in self.__cmd -- cgit v1.2.3