From e9534d6f927ea6ef20c38ec4da4a4f3c10eddb84 Mon Sep 17 00:00:00 2001 From: SkyKnight <18136365+SkyKnightSKS@users.noreply.github.com> Date: Fri, 28 Jul 2023 18:48:14 +0200 Subject: [PATCH] webhooks: Add process id, user id and group id to the info endpoint. (#6284) Signed-off-by: Gregoire Mbutilovich --- klippy/webhooks.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/klippy/webhooks.py b/klippy/webhooks.py index 9188a4f7..bccc5aac 100644 --- a/klippy/webhooks.py +++ b/klippy/webhooks.py @@ -354,9 +354,14 @@ class WebHooks: state_message, state = self.printer.get_state_message() src_path = os.path.dirname(__file__) klipper_path = os.path.normpath(os.path.join(src_path, "..")) - response = {'state': state, 'state_message': state_message, + response = {'state': state, + 'state_message': state_message, 'hostname': socket.gethostname(), - 'klipper_path': klipper_path, 'python_path': sys.executable} + 'klipper_path': klipper_path, + 'python_path': sys.executable, + 'process_id': os.getpid(), + 'user_id': os.getuid(), + 'group_id': os.getgid()} start_args = self.printer.get_start_args() for sa in ['log_file', 'config_file', 'software_version', 'cpu_info']: response[sa] = start_args.get(sa)