Commit 399dc9f6 authored by Nicolas Wavrant's avatar Nicolas Wavrant

slaprunner: runSoftwareProfile and runInstanceProfile now use runSlapgridUntilSuccess

parent d1c7106d
...@@ -3,10 +3,11 @@ ...@@ -3,10 +3,11 @@
# pylint: disable-msg=W0311,C0301,C0103,C0111 # pylint: disable-msg=W0311,C0301,C0103,C0111
import json
import os import os
import shutil import shutil
import thread
import urllib import urllib
import json
from flask import (Flask, request, redirect, url_for, render_template, from flask import (Flask, request, redirect, url_for, render_template,
g, flash, jsonify, session, abort, send_file) g, flash, jsonify, session, abort, send_file)
...@@ -136,10 +137,8 @@ def removeSoftware(): ...@@ -136,10 +137,8 @@ def removeSoftware():
def runSoftwareProfile(): def runSoftwareProfile():
if runSoftwareWithLock(app.config): thread.start_new_thread(runSlapgridUntilSuccess, (app.config, "software"))
return jsonify(result=True) return jsonify(result=True)
else:
return jsonify(result=False)
# instance views # instance views
...@@ -200,10 +199,8 @@ def removeInstance(): ...@@ -200,10 +199,8 @@ def removeInstance():
def runInstanceProfile(): def runInstanceProfile():
if not os.path.exists(app.config['instance_root']): if not os.path.exists(app.config['instance_root']):
os.mkdir(app.config['instance_root']) os.mkdir(app.config['instance_root'])
if runInstanceWithLock(app.config): thread.start_new_thread(runSlapgridUntilSuccess, (app.config, "instance"))
return jsonify(result=True) return jsonify(result=True)
else:
return jsonify(result=False)
def viewLog(): def viewLog():
......
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