From 42b590b3a4aeef68cf7b6e60134a98388b7d7bf8 Mon Sep 17 00:00:00 2001 From: Christian Ariza Date: Tue, 31 Mar 2020 18:57:15 +0200 Subject: [PATCH] [DONOTMERGE] Normalize WMTool value this is a temporary change, The value was fixed upstream, this change is only needed while old tasks are still being processed --- src/htcondor_es/convert_to_json.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/htcondor_es/convert_to_json.py b/src/htcondor_es/convert_to_json.py index 2e07ef2..84410d5 100644 --- a/src/htcondor_es/convert_to_json.py +++ b/src/htcondor_es/convert_to_json.py @@ -947,7 +947,12 @@ def convert_to_json( result["CommittedTime"] = result.get("RemoteWallClockTime") elif "CRAB_Id" in result: # If is an analysis or HC test task. result["CRAB_PostJobStatus"] = _status - + # Normalize wmtool value, this is a temporary change + # Not to be merged (The value was fixed upstream, + # this change is only needed while old tasks + # are still being processed + _wmtool = result.get("CMS_WMTool","UNKNOWN") + result["CMS_WMTool"] = "User" if _wmtool.lower() == "user" else _wmtool if reduce_data: result = drop_fields_for_running_jobs(result)