Skip to content

Commit

Permalink
add back CRAB_JobReleaseTimeout in DAG JDL. Fix dmwm#8852
Browse files Browse the repository at this point in the history
  • Loading branch information
belforte committed Dec 2, 2024
1 parent ddd6ce1 commit 32515d2
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/python/TaskWorker/Actions/DagmanSubmitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,18 @@ def addCRABInfoToJobJDL(jdl, info):
from the info directory
"""
for adName, dictName in SUBMIT_INFO:
if dictName in info and info[dictName] is not None:
if dictName in info and info[dictName] is not None: # 0 or False still is valid info[]
jdl[adName] = str(info[dictName])
# CRAB_JobReleaseTimeout is passed in the config as an extraJDL, even if
# it is meant to be used in the PreJob which will look in the DAG ads
# so we need to add it to the DAG JDL as well
# Note: extraJDL config. param is a list, DagmanCreator changes it to multiple lines
if 'extra_jdl' in info and info['extra_jdl']:
for ejdl in info['extra_jdl'].split('\n'):
k, v = ejdl.split('=', 1)
if k == "+CRAB_JobReleaseTimeout":
jdl[k] = v


class ScheddStats(dict):
""" collect statistics of submission success/failure at various schedulers """
Expand Down Expand Up @@ -371,8 +381,6 @@ def executeInternal(self, info, inputFiles, **kwargs):
"""Internal execution to submit to selected scheduler
Before submission it does duplicate check to see if
task was not submitted by previous time"""
if not htcondor:
raise Exception("Unable to import HTCondor module")

task = kwargs['task']
workflow = task['tm_taskname']
Expand Down

0 comments on commit 32515d2

Please sign in to comment.