oocana 0.15.4__tar.gz → 0.16.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {oocana-0.15.4 → oocana-0.16.1}/PKG-INFO +1 -1
- {oocana-0.15.4 → oocana-0.16.1}/oocana/context.py +13 -1
- {oocana-0.15.4 → oocana-0.16.1}/pyproject.toml +1 -1
- {oocana-0.15.4 → oocana-0.16.1}/oocana/__init__.py +0 -0
- {oocana-0.15.4 → oocana-0.16.1}/oocana/data.py +0 -0
- {oocana-0.15.4 → oocana-0.16.1}/oocana/handle_data.py +0 -0
- {oocana-0.15.4 → oocana-0.16.1}/oocana/mainframe.py +0 -0
- {oocana-0.15.4 → oocana-0.16.1}/oocana/preview.py +0 -0
- {oocana-0.15.4 → oocana-0.16.1}/oocana/schema.py +0 -0
- {oocana-0.15.4 → oocana-0.16.1}/oocana/service.py +0 -0
- {oocana-0.15.4 → oocana-0.16.1}/oocana/throtter.py +0 -0
- {oocana-0.15.4 → oocana-0.16.1}/tests/__init__.py +0 -0
- {oocana-0.15.4 → oocana-0.16.1}/tests/test_data.py +0 -0
- {oocana-0.15.4 → oocana-0.16.1}/tests/test_handle_data.py +0 -0
- {oocana-0.15.4 → oocana-0.16.1}/tests/test_json.py +0 -0
- {oocana-0.15.4 → oocana-0.16.1}/tests/test_mainframe.py +0 -0
- {oocana-0.15.4 → oocana-0.16.1}/tests/test_performance.py +0 -0
- {oocana-0.15.4 → oocana-0.16.1}/tests/test_schema.py +0 -0
- {oocana-0.15.4 → oocana-0.16.1}/tests/test_throtter.py +0 -0
@@ -39,10 +39,11 @@ class Context:
|
|
39
39
|
__is_done: bool = False
|
40
40
|
__keep_alive: OnlyEqualSelf = OnlyEqualSelf()
|
41
41
|
__session_dir: str
|
42
|
+
__tmp_dir: str
|
42
43
|
_logger: Optional[logging.Logger] = None
|
43
44
|
|
44
45
|
def __init__(
|
45
|
-
self, inputs: Dict[str, Any], blockInfo: BlockInfo, mainframe: Mainframe, store, outputs, session_dir: str
|
46
|
+
self, inputs: Dict[str, Any], blockInfo: BlockInfo, mainframe: Mainframe, store, outputs, session_dir: str, tmp_dir: str
|
46
47
|
) -> None:
|
47
48
|
|
48
49
|
self.__block_info = blockInfo
|
@@ -57,6 +58,7 @@ class Context:
|
|
57
58
|
outputs_defs[k] = HandleDef(**v)
|
58
59
|
self.__outputs_def = outputs_defs
|
59
60
|
self.__session_dir = session_dir
|
61
|
+
self.__tmp_dir = tmp_dir
|
60
62
|
|
61
63
|
@property
|
62
64
|
def logger(self) -> logging.Logger:
|
@@ -73,6 +75,12 @@ class Context:
|
|
73
75
|
"""a temporary directory for the current session, all blocks in the one session will share the same directory.
|
74
76
|
"""
|
75
77
|
return self.__session_dir
|
78
|
+
|
79
|
+
@property
|
80
|
+
def tmp_dir(self) -> str:
|
81
|
+
"""a temporary directory for the current follow, all blocks in the this flow will share the same directory. this directory will be cleaned if this session finish successfully, otherwise it will be kept for debugging or other purpose.
|
82
|
+
"""
|
83
|
+
return self.__tmp_dir
|
76
84
|
|
77
85
|
@property
|
78
86
|
def keepAlive(self):
|
@@ -121,6 +129,10 @@ class Context:
|
|
121
129
|
"gpu_vendor": os.getenv("OOMOL_HOST_GPU_VENDOR", "unknown"),
|
122
130
|
"gpu_renderer": os.getenv("OOMOL_HOST_GPU_RENDERER", "unknown"),
|
123
131
|
}
|
132
|
+
|
133
|
+
@property
|
134
|
+
def is_done(self) -> bool:
|
135
|
+
return self.__is_done
|
124
136
|
|
125
137
|
def __store_ref(self, handle: str):
|
126
138
|
return StoreKey(
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|