Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make sure that workflow commands are written with all the quotes #19472

Merged
merged 1 commit into from Jun 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 2 additions & 5 deletions Configuration/PyReleaseValidation/python/MatrixRunner.py
@@ -1,6 +1,4 @@

import os, sys, time
import random

from Configuration.PyReleaseValidation.WorkFlow import WorkFlow
from Configuration.PyReleaseValidation.WorkFlowRunner import WorkFlowRunner
Expand Down Expand Up @@ -56,16 +54,15 @@ def runTests(self, opt):

# make sure we don't run more than the allowed number of threads:
while self.activeThreads() >= self.maxThreads:
time.sleep(10)
continue
time.sleep(1)

print '\nPreparing to run %s %s' % (wf.numId, item)
sys.stdout.flush()
current = WorkFlowRunner(wf,noRun,dryRun,cafVeto, opt.dasOptions, opt.jobReports, opt.nThreads, opt.maxSteps)
self.threadList.append(current)
current.start()
if not dryRun:
time.sleep(random.randint(1,5)) # try to avoid race cond by sleeping random amount of time [1,5] sec
time.sleep(0.5) # try to avoid race cond by sleeping 0.5 sec

# wait until all threads are finished
while self.activeThreads() > 0:
Expand Down
5 changes: 3 additions & 2 deletions Configuration/PyReleaseValidation/python/WorkFlowRunner.py
Expand Up @@ -155,8 +155,9 @@ def closeCmd(i,ID):
cmd+=closeCmd(istep,self.wf.nameId)
retStep = 0
if istep>self.maxSteps:
p = Popen("echo 'step%s:%s' >> %s/wf_steps.txt" % (istep, cmd, self.wfDir), shell=True)
os.waitpid(p.pid, 0)[1]
wf_stats = open("%s/wf_steps.txt" % self.wfDir,"a")
wf_stats.write('step%s:%s\n' % (istep, cmd))
wf_stats.close()
else: retStep = self.doCmd(cmd)

self.retStep.append(retStep)
Expand Down