From 54576c927fe40509d146212dce65c555148a22c5 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 5 Jul 2014 02:09:10 +0400 Subject: [PATCH] Pass subproc_* parameters to the subprocess --- Robots/bkmk_rforking.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Robots/bkmk_rforking.py b/Robots/bkmk_rforking.py index e1b4ee2..0d41c74 100644 --- a/Robots/bkmk_rforking.py +++ b/Robots/bkmk_rforking.py @@ -53,7 +53,15 @@ class robot_forking(Robot): global _set_subproc if _set_subproc: _set_subproc = False - os.environ['BKMK_ROBOT'] = self.subproc + + subproc = self.subproc + subproc_attrs = [] + for attr in dir(self): + if attr.startswith('subproc_'): + subproc_attrs.append((attr[len('subproc_'):], getattr(self, attr))) + if subproc_attrs: + subproc += ':' + ':'.join(['='.join((k,v)) for k,v in subproc_attrs]) + os.environ['BKMK_ROBOT'] = subproc if not check_subp: restart_subp(self.log) # Not restart, just start afresh -- 2.39.5