|
@@ -51,7 +51,7 @@ class PipelineCache(GreenWorker):
|
|
|
self.__lock = Lock()
|
|
|
|
|
|
|
|
|
- def load_from_root_folder(self, project: Project, root_folder: str, no_cache: bool = False) -> Pipeline:
|
|
|
+ def load_from_root_folder(self, project: Project, no_cache: bool = False) -> Pipeline:
|
|
|
"""
|
|
|
load configuration.json and create an instance from the included code object
|
|
|
|
|
@@ -59,6 +59,8 @@ class PipelineCache(GreenWorker):
|
|
|
:param root_folder: path to model root folder
|
|
|
:return: Pipeline instance
|
|
|
"""
|
|
|
+ root_folder = project.model.root_folder
|
|
|
+
|
|
|
# check if instance is cached
|
|
|
with self.__lock:
|
|
|
if root_folder in self.__pipelines:
|
|
@@ -85,7 +87,7 @@ class PipelineCache(GreenWorker):
|
|
|
# return
|
|
|
return pipeline
|
|
|
|
|
|
- def free_instance(self, root_folder: str):
|
|
|
+ def free_instance(self, project: Project):
|
|
|
"""
|
|
|
Change an instance's status to unused and start the timer to call it's `close` function
|
|
|
after `CLOSE_TIMER` seconds. The next call to `load_from_root_folder` in this interval
|
|
@@ -93,6 +95,8 @@ class PipelineCache(GreenWorker):
|
|
|
|
|
|
:param root_folder: path to model root folder
|
|
|
"""
|
|
|
+ root_folder = project.model.root_folder
|
|
|
+
|
|
|
with self.__lock:
|
|
|
if root_folder in self.__pipelines:
|
|
|
# reset "last used" to now
|