Commit ef534188 authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Use thread name as identifier for non-job tasks



Non-jobs requesting resources need to identify themselves by a string
describing uniquely what they do. For the time being (while masterd
still exists), these non-jobs are client requests to masterd. Fortunately,
they already have a unique id, the thread name, which is composed of
the description of the task (like "ClientReq") followed by a running
number.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent 9c45196b
......@@ -69,9 +69,12 @@ def GetWConfdContext(ec_id, livelock):
@return: the WConfd context
"""
return (ec_id,
threading.current_thread().ident,
livelock.lockfile.name)
if ec_id is None:
return (threading.current_thread().getName(),
livelock.lockfile.name)
else:
return (ec_id,
livelock.lockfile.name)
def GetConfig(ec_id, livelock, **kwargs):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment