Commit d7496eaf authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

[runner] add logging when we remove all instances inside a webrunner.

This shall be helpful when debugging why the data disappeared from a
parent 73448779
......@@ -562,6 +562,7 @@ def configNewSR(config, projectpath):
if folder:
sup_process.stopProcess(config, 'slapgrid-cp')
sup_process.stopProcess(config, 'slapgrid-sr')
logger.warning("User opened a new SR. Removing all instances...")
open(os.path.join(config['etc_dir'], ".project"), 'w').write(projectpath)
return True
......@@ -600,6 +601,7 @@ def newSoftware(folder, config, session):
#Stop runngin process and remove existing instance
logger.warning("User created a new SR. Removing all instances...")
session['title'] = getProjectTitle(config)
code = 1
......@@ -678,6 +680,7 @@ def removeSoftwareByName(config, md5, folder_name):
return (0, "Software installation or instantiation in progress, cannot remove")
if getSoftwareReleaseName(config) == folder_name:
logger.warning("User removed the SR currently used. Removing all instances...")
result = removeSoftwareRootDirectory(config, md5, folder_name)
......@@ -215,6 +215,7 @@ def supervisordStatus():
def removeInstance():
logger.warning("User clicked on 'Destroy All Services'. Removing all instances...")
result = removeCurrentInstance(app.config)
if isinstance(result, str):
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