From 44ad6a44fff8eece4c4bbb4b16d933c64010efac Mon Sep 17 00:00:00 2001 From: Jun Aishima Date: Thu, 14 Sep 2023 14:36:03 -0400 Subject: [PATCH 1/3] fix ISPyB processing population error * taking first 256 characters of processing commandline to prevent the error "Data too long for column 'p_commandLine'" --- ispybLib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ispybLib.py b/ispybLib.py index 2fbcac78..97800d3f 100644 --- a/ispybLib.py +++ b/ispybLib.py @@ -203,6 +203,8 @@ def insertResult(result,resultType,request,visitName,dc_id=None,xmlFileName=None sample = request['sample'] # this needs to be created and linked to a DC group if (resultType == 'fastDP'): mx_data_reduction_dict = xml_file_to_dict(xmlFileName) + comm = mx_data_reduction_dict['AutoProcProgramContainer']['AutoProcProgram']['processingCommandLine'] + mx_data_reduction_dict['AutoProcProgramContainer']['AutoProcProgram']['processingCommandLine'] = comm[:255] (app_id, ap_id, scaling_id, integration_id) = mx_data_reduction_to_ispyb(mx_data_reduction_dict, dc_id, mxprocessing) mxprocessing.upsert_program_ex(program_id=app_id,status=1) From d550b9268b450e710195f70f8a2995a98570d607 Mon Sep 17 00:00:00 2001 From: Jun Aishima Date: Thu, 14 Sep 2023 15:12:19 -0400 Subject: [PATCH 2/3] store last 255 characters of processing call * better to lose the first part of the fastDP call than more significant information at the end of the call --- ispybLib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ispybLib.py b/ispybLib.py index 97800d3f..62c5a4ea 100644 --- a/ispybLib.py +++ b/ispybLib.py @@ -204,7 +204,7 @@ def insertResult(result,resultType,request,visitName,dc_id=None,xmlFileName=None if (resultType == 'fastDP'): mx_data_reduction_dict = xml_file_to_dict(xmlFileName) comm = mx_data_reduction_dict['AutoProcProgramContainer']['AutoProcProgram']['processingCommandLine'] - mx_data_reduction_dict['AutoProcProgramContainer']['AutoProcProgram']['processingCommandLine'] = comm[:255] + mx_data_reduction_dict['AutoProcProgramContainer']['AutoProcProgram']['processingCommandLine'] = comm[(len(comm)-255:] (app_id, ap_id, scaling_id, integration_id) = mx_data_reduction_to_ispyb(mx_data_reduction_dict, dc_id, mxprocessing) mxprocessing.upsert_program_ex(program_id=app_id,status=1) From 5a17f0c7083aacfce9c8c17da6a04f6ac8a66a02 Mon Sep 17 00:00:00 2001 From: Jun Aishima Date: Mon, 16 Oct 2023 16:54:05 -0400 Subject: [PATCH 3/3] fix typo --- ispybLib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ispybLib.py b/ispybLib.py index 62c5a4ea..bfd8d42a 100644 --- a/ispybLib.py +++ b/ispybLib.py @@ -204,7 +204,7 @@ def insertResult(result,resultType,request,visitName,dc_id=None,xmlFileName=None if (resultType == 'fastDP'): mx_data_reduction_dict = xml_file_to_dict(xmlFileName) comm = mx_data_reduction_dict['AutoProcProgramContainer']['AutoProcProgram']['processingCommandLine'] - mx_data_reduction_dict['AutoProcProgramContainer']['AutoProcProgram']['processingCommandLine'] = comm[(len(comm)-255:] + mx_data_reduction_dict['AutoProcProgramContainer']['AutoProcProgram']['processingCommandLine'] = comm[len(comm)-255:] (app_id, ap_id, scaling_id, integration_id) = mx_data_reduction_to_ispyb(mx_data_reduction_dict, dc_id, mxprocessing) mxprocessing.upsert_program_ex(program_id=app_id,status=1)