From edaafbac7f0e49d61a49ece6afa0c57f1f11c9b7 Mon Sep 17 00:00:00 2001 From: Andre Merzky Date: Mon, 10 Jun 2024 16:03:22 +0200 Subject: [PATCH 1/3] logfile filx --- src/radical/utils/flux.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/radical/utils/flux.py b/src/radical/utils/flux.py index ffa198c5..90fbadcf 100644 --- a/src/radical/utils/flux.py +++ b/src/radical/utils/flux.py @@ -263,7 +263,7 @@ class FluxHelper(object): # -------------------------------------------------------------------------- # - def __init__(self) -> None: + def __init__(self, name:str = None) -> None: ''' The Flux Helper c'tor takes no arguments and will initially not be connected to a Flux instance. After construction, the application can @@ -313,6 +313,7 @@ def __init__(self) -> None: self._env = None self._uid = generate_id('flux.%(item_counter)04d', ID_CUSTOM) + self._name = name or self._uid self._log = Logger(self._uid, ns='radical.utils') self._prof = Profiler(self._uid, ns='radical.utils') From 74b79a012293111e3759423ad5490911c04bd0ee Mon Sep 17 00:00:00 2001 From: Andre Merzky Date: Mon, 10 Jun 2024 16:06:24 +0200 Subject: [PATCH 2/3] logfile fix --- src/radical/utils/flux.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/radical/utils/flux.py b/src/radical/utils/flux.py index 90fbadcf..edbfbc6a 100644 --- a/src/radical/utils/flux.py +++ b/src/radical/utils/flux.py @@ -314,8 +314,8 @@ def __init__(self, name:str = None) -> None: self._uid = generate_id('flux.%(item_counter)04d', ID_CUSTOM) self._name = name or self._uid - self._log = Logger(self._uid, ns='radical.utils') - self._prof = Profiler(self._uid, ns='radical.utils') + self._log = Logger(self._name, ns='radical.utils') + self._prof = Profiler(self._name, ns='radical.utils') self._lock = mt.RLock() From e21b77473b1944c03fa9c8c672e55ad866bd266f Mon Sep 17 00:00:00 2001 From: Andre Merzky Date: Tue, 11 Jun 2024 00:27:20 +0200 Subject: [PATCH 3/3] use uid for flux log names --- src/radical/utils/flux.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/radical/utils/flux.py b/src/radical/utils/flux.py index edbfbc6a..92980e0b 100644 --- a/src/radical/utils/flux.py +++ b/src/radical/utils/flux.py @@ -263,7 +263,7 @@ class FluxHelper(object): # -------------------------------------------------------------------------- # - def __init__(self, name:str = None) -> None: + def __init__(self, uid:str = None) -> None: ''' The Flux Helper c'tor takes no arguments and will initially not be connected to a Flux instance. After construction, the application can @@ -309,16 +309,16 @@ def __init__(self, name:str = None) -> None: self._service : Optional[_FluxService] = None - self._uri = None - self._env = None + if uid: self._uid = uid + else : self._uid = generate_id('flux.%(item_counter)04d', ID_CUSTOM) - self._uid = generate_id('flux.%(item_counter)04d', ID_CUSTOM) - self._name = name or self._uid - self._log = Logger(self._name, ns='radical.utils') - self._prof = Profiler(self._name, ns='radical.utils') + self._log = Logger(self._uid, ns='radical.utils') + self._prof = Profiler(self._uid, ns='radical.utils') self._lock = mt.RLock() + self._uri = None + self._env = None self._exe = None self._handle = None self._handles = list() # TODO