@@ -845,7 +845,7 @@ def submit_panda_task(self, processing):
845
845
if self .additional_task_parameters_per_site :
846
846
try :
847
847
for site in self .additional_task_parameters_per_site :
848
- if (task_param ['PandaSite' ] and site in task_param ['PandaSite' ]) or (task_param ['site' ] and site in task_param ['site' ]):
848
+ if ('PandaSite' in task_param and task_param ['PandaSite' ] and site in task_param ['PandaSite' ]) or ('site' in task_param and task_param ['site' ] and site in task_param ['site' ]):
849
849
for key , value in self .additional_task_parameters_per_site [site ].items ():
850
850
if key not in task_param :
851
851
task_param [key ] = value
@@ -857,7 +857,7 @@ def submit_panda_task(self, processing):
857
857
# core_to_queues = {"1": {"queues": ["Rubin", "Rubin_Extra_Himem"], "processing_type": ""},
858
858
# "Rubin_Multi": {"queues": ["Rubin_Multi"], "processing_type": "Rubin_Multi"},
859
859
# "Rubin_Merge": {"queues": ["Rubin_Merge"], "processing_type": "Rubin_Merge"},
860
- # "any": " Rubin_Multi"}
860
+ # "any": {"queues": [" Rubin_Multi"], "processing_type": "Rubin_Multi"} }
861
861
862
862
if task_param ['processingType' ]:
863
863
msg = f"processingType { task_param ['processingType' ]} is already set, do nothing"
@@ -867,8 +867,7 @@ def submit_panda_task(self, processing):
867
867
queue_processing_type = {}
868
868
for k in self .core_to_queues :
869
869
key = str (k )
870
- if not key .isdigit ():
871
- num_cores .append (key )
870
+ num_cores .append (key )
872
871
if key not in ['any' ]:
873
872
queues = self .core_to_queues [k ].get ('queues' , [])
874
873
processing_type = self .core_to_queues [k ].get ('processing_type' , '' )
@@ -881,6 +880,14 @@ def submit_panda_task(self, processing):
881
880
msg = f"processingType is not defined, set it to { p_type } based on coreCount { task_param ['coreCount' ]} "
882
881
task_param ['processingType' ] = p_type
883
882
self .logger .warn (msg )
883
+ if 'site' in task_param and task_param ['site' ]:
884
+ for q in queue_processing_type :
885
+ if task_param ['site' ] in q or q in task_param ['site' ]:
886
+ p_type = queue_processing_type [q ]
887
+ if p_type :
888
+ msg = f"processingType is not defined, set it to { p_type } based on site { task_param ['site' ]} "
889
+ task_param ['processingType' ] = p_type
890
+ self .logger .debug (msg )
884
891
else :
885
892
if 'site' in task_param and task_param ['site' ]:
886
893
for q in queue_processing_type :
0 commit comments