|
|
|
@ -207,7 +207,7 @@ class Project:
|
|
|
|
|
:returns: Node working directory
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
workdir = os.path.join(self._path, "project-files", node.manager.module_name.lower(), node.id)
|
|
|
|
|
workdir = self.node_working_path(node)
|
|
|
|
|
if not self._deleted:
|
|
|
|
|
try:
|
|
|
|
|
os.makedirs(workdir, exist_ok=True)
|
|
|
|
@ -215,6 +215,15 @@ class Project:
|
|
|
|
|
raise aiohttp.web.HTTPInternalServerError(text="Could not create the node working directory: {}".format(e))
|
|
|
|
|
return workdir
|
|
|
|
|
|
|
|
|
|
def node_working_path(self, node):
|
|
|
|
|
"""
|
|
|
|
|
Returns a node working path for node. It doesn't create structure if not present on system.
|
|
|
|
|
:param node: Node instance
|
|
|
|
|
:return: Node working path
|
|
|
|
|
"""
|
|
|
|
|
return os.path.join(self._path, "project-files", node.manager.module_name.lower(), node.id)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def tmp_working_directory(self):
|
|
|
|
|
"""
|
|
|
|
|
A temporary directory. Will be clean at project open and close
|
|
|
|
|