Commit 097a3015 authored by Nicolas Wavrant's avatar Nicolas Wavrant

runner: /isSRReady check all Software Releases

parent b5861179
......@@ -893,15 +893,18 @@ def readParameters(path):
else:
return "No such file or directory: %s" % path
def isSoftwareReleaseCompleted(config):
software_name = getSoftwareReleaseName(config)
if software_name is None:
return False
elif os.path.exists(os.path.join(config['software_link'],
software_name, '.completed')):
return True
def areAllSoftwareReleaseCompleted(config):
result_list = []
for software_release_uri in self.getAvailableSoftwareReleaseURIList(config):
software_release_path = os.path.join(
config['software_root'],
md5digest(software_release_uri)
)
if os.path.exists(os.path.join(software_release_path, '.completed')):
result_list.append(True)
else:
return False
resultd_list.append(False)
return all(result_list)
def isSoftwareReleaseReady(config):
"""Return 1 if the Software Release has
......@@ -913,7 +916,7 @@ def isSoftwareReleaseReady(config):
if not ( os.path.exists(project) and (auto_run or auto_deploy) ):
return "0"
updateInstanceParameter(config)
if isSoftwareReleaseCompleted(config):
if areAllSoftwareReleaseCompleted(config):
if auto_run:
runSlapgridUntilSuccess(config, 'instance')
return "1"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment