Skip to content

Commit 9bd9c0c

Browse files
author
Andrei Tsaregorodtsev
authored
Merge pull request #5982 from DIRACGridBot/cherry-pick-2-381df2fcb-integration
[sweep:integration] Fix PushJobAgent
2 parents 2cc4d1a + 6e19cae commit 9bd9c0c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/DIRAC/WorkloadManagementSystem/Agent/PushJobAgent.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def execute(self):
152152

153153
# Check that there is enough slots locally
154154
result = self._checkCEAvailability(self.computingElement)
155-
if not result["OK"]:
155+
if not result["OK"] or result["Value"]:
156156
return result
157157

158158
for queueName, queueDictionary in queueDictItems:
@@ -177,7 +177,7 @@ def execute(self):
177177

178178
# Check that there is enough slots in the remote CE to match a job
179179
result = self._checkCEAvailability(ce)
180-
if not result["OK"] or (result["OK"] and result["Value"]):
180+
if not result["OK"] or result["Value"]:
181181
self.failedQueues[queueName] += 1
182182
continue
183183

@@ -317,12 +317,12 @@ def execute(self):
317317

318318
# Check that there is enough slots locally
319319
result = self._checkCEAvailability(self.computingElement)
320-
if not result["OK"]:
320+
if not result["OK"] or result["Value"]:
321321
return result
322322

323323
# Check that there is enough slots in the remote CE to match a new job
324324
result = self._checkCEAvailability(ce)
325-
if not result["OK"] or (result["OK"] and result["Value"]):
325+
if not result["OK"] or result["Value"]:
326326
self.failedQueues[queueName] += 1
327327
break
328328

src/DIRAC/WorkloadManagementSystem/scripts/dirac_jobexec.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def main():
2626
# from DIRAC.Core.Workflow.Parameter import *
2727
from DIRAC import gLogger
2828
from DIRAC.Core.Workflow.Workflow import fromXMLFile
29+
from DIRAC.Core.Utilities.Proxy import executeWithoutServerCertificate
2930
from DIRAC.WorkloadManagementSystem.Client.JobReport import JobReport
3031
from DIRAC.AccountingSystem.Client.DataStoreClient import DataStoreClient
3132
from DIRAC.RequestManagementSystem.Client.Request import Request
@@ -34,6 +35,7 @@ def main():
3435
sys.path.insert(0, os.path.realpath("."))
3536
gLogger.showHeaders(True)
3637

38+
@executeWithoutServerCertificate
3739
def jobexec(jobxml, wfParameters):
3840
jobfile = os.path.abspath(jobxml)
3941
if not os.path.exists(jobfile):

0 commit comments

Comments
 (0)