Commit 8446e02d authored by Zdralovic Edim's avatar Zdralovic Edim

Merged

parents f61bd7a4 b2ce3016
......@@ -58,7 +58,7 @@ class CWLRestAPI(FlaskView):
route_base = '/' #flask_classful specific, class variable
def __init__(self):
self.baseDir = './workflows/' #for developing only
self.sharedStorage = '/home/cuhoni66/toilCWLTest/'
self.sharedStorage = './datasets/'
self.__wfManager = WorkflowManager()
############################################################
#Section: Routed Methods
......@@ -77,7 +77,7 @@ class CWLRestAPI(FlaskView):
byteData = request.data
data = json.loads(byteData.decode("utf-8"))
wf = WorkflowWrapper(userToken = data["usertoken"], sharedStorage = self.sharedStorage, workflowName = data["workflowName"], baseDir = self.baseDir)
wf = WorkflowWrapper(userToken = data["usertoken"], sharedStorage = self.sharedStorage+data["sharedStoragePath"], workflowName = data["workflowName"], baseDir = self.baseDir)
self.__wfManager.addWorkflow(wf)
return json.dumps(self.__wfManager.startWorkflow(wf.workflowName))
......@@ -365,7 +365,8 @@ class WorkflowWrapper(threading.Thread):
self.toilProcess = None
self.workflowName = workflowName
self.gitRepoUrl = gitRepoUrl
self.outDir = sys.intern(self.baseDir+userToken+"/out/")
self.outDir = sys.intern(self.sharedStorage+"/out/")
os.makedirs(self.outDir)
self.workDir = sys.intern(baseDir+userToken+"/work/")
self.jobStore = sys.intern(baseDir+userToken+"/jobStore/")
self.logDir = sys.intern(baseDir+userToken+"/logs/")
......@@ -392,7 +393,7 @@ class WorkflowWrapper(threading.Thread):
"""
if not os.path.exists(self.baseDir+self.userToken):
os.makedirs(self.baseDir+self.userToken)
os.makedirs(self.outDir)
#os.makedirs(self.outDir)
os.makedirs(self.workDir)
os.makedirs(self.logDir)
os.makedirs(self.jobStore)
......
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