Skip to content

Commit d54ce8e

Browse files
committed
fix(resources): prevent pilots from being rescheduled in HTCondor
1 parent a8c093a commit d54ce8e

File tree

1 file changed

+3
-3
lines changed
  • src/DIRAC/Resources/Computing/BatchSystems

1 file changed

+3
-3
lines changed

src/DIRAC/Resources/Computing/BatchSystems/Condor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
# Requirements
6464
# ------------
6565
request_cpus = %(processors)s
66+
requirements = NumJobStarts == 0
6667
6768
# Exit options
6869
# ------------
@@ -74,7 +75,8 @@
7475
# A subcode of our choice to identify who put the job on hold
7576
on_exit_hold_subcode = %(holdReasonSubcode)s
7677
# Jobs are then deleted from the system after N days if they are not idle or running
77-
periodic_remove = (JobStatus != 1) && (JobStatus != 2) && ((time() - EnteredCurrentStatus) > (%(daysToKeepRemoteLogs)s * 24 * 3600))
78+
periodic_remove = ((JobStatus == 1) && (NumJobStarts > 0)) || \
79+
((JobStatus != 1) && (JobStatus != 2) && ((time() - EnteredCurrentStatus) > (%(daysToKeepRemoteLogs)s * 24 * 3600))
7880
7981
# Specific options
8082
# ----------------
@@ -143,8 +145,6 @@ def submitJob(self, **kwargs):
143145
preamble = kwargs.get("Preamble")
144146

145147
jdlFile = tempfile.NamedTemporaryFile(dir=outputDir, suffix=".jdl", mode="wt")
146-
scheddOptions = 'requirements = OpSys == "LINUX"\n'
147-
scheddOptions += "gentenv = False"
148148
jdlFile.write(
149149
subTemplate
150150
% dict(

0 commit comments

Comments
 (0)