dv-flow-mgr 0.0.2.14149347362a1__py3-none-any.whl → 0.0.2.14150065664a1__py3-none-any.whl
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.
- dv_flow/mgr/task_run_ctxt.py +16 -0
- {dv_flow_mgr-0.0.2.14149347362a1.dist-info → dv_flow_mgr-0.0.2.14150065664a1.dist-info}/METADATA +1 -1
- {dv_flow_mgr-0.0.2.14149347362a1.dist-info → dv_flow_mgr-0.0.2.14150065664a1.dist-info}/RECORD +7 -7
- {dv_flow_mgr-0.0.2.14149347362a1.dist-info → dv_flow_mgr-0.0.2.14150065664a1.dist-info}/WHEEL +0 -0
- {dv_flow_mgr-0.0.2.14149347362a1.dist-info → dv_flow_mgr-0.0.2.14150065664a1.dist-info}/entry_points.txt +0 -0
- {dv_flow_mgr-0.0.2.14149347362a1.dist-info → dv_flow_mgr-0.0.2.14150065664a1.dist-info}/licenses/LICENSE +0 -0
- {dv_flow_mgr-0.0.2.14149347362a1.dist-info → dv_flow_mgr-0.0.2.14150065664a1.dist-info}/top_level.txt +0 -0
dv_flow/mgr/task_run_ctxt.py
CHANGED
@@ -23,6 +23,19 @@ class TaskRunCtxt(object):
|
|
23
23
|
logfilter=None,
|
24
24
|
cwd=None,
|
25
25
|
env=None):
|
26
|
+
"""
|
27
|
+
Executes a command as part of the task's implementation.
|
28
|
+
Output from the command will be saved to the specified logfile,
|
29
|
+
or to a default logfile if not specified. If the command
|
30
|
+
fails, an error marker will be added.
|
31
|
+
|
32
|
+
Example:
|
33
|
+
|
34
|
+
.. code-block:: python
|
35
|
+
|
36
|
+
status |= await runner.exec(['ls', '-l'], logfile='ls.log')
|
37
|
+
|
38
|
+
"""
|
26
39
|
if logfile is None:
|
27
40
|
logfile = "cmd_%d.log" % (self._exec_info.__len__() + 1)
|
28
41
|
|
@@ -45,6 +58,7 @@ class TaskRunCtxt(object):
|
|
45
58
|
return status
|
46
59
|
|
47
60
|
def create(self, path, content):
|
61
|
+
"""Create a file in the task's rundir"""
|
48
62
|
if not os.path.isabs(path):
|
49
63
|
path = os.path.join(self.rundir, path)
|
50
64
|
|
@@ -56,10 +70,12 @@ class TaskRunCtxt(object):
|
|
56
70
|
|
57
71
|
|
58
72
|
def marker(self, msg : str, severity : SeverityE, loc : TaskMarkerLoc=None):
|
73
|
+
"""Add a marker related to the task's execution"""
|
59
74
|
if loc is not None:
|
60
75
|
self._markers.append(TaskMarker(msg=msg, severity=severity, loc=loc))
|
61
76
|
else:
|
62
77
|
self._markers.append(TaskMarker(msg=msg, severity=severity))
|
63
78
|
|
64
79
|
def error(self, msg : str, loc : TaskMarkerLoc=None):
|
80
|
+
"""Add an error marker related to the task's execution"""
|
65
81
|
self.marker(msg=msg, severity=SeverityE.Error, loc=loc)
|
{dv_flow_mgr-0.0.2.14149347362a1.dist-info → dv_flow_mgr-0.0.2.14150065664a1.dist-info}/RECORD
RENAMED
@@ -31,7 +31,7 @@ dv_flow/mgr/task_node_ctor_wrapper.py,sha256=Nb1CVcPHZofnb-iLWDHQWAxlTOdbRrnR9Dd
|
|
31
31
|
dv_flow/mgr/task_node_leaf.py,sha256=IXPYnjDJvfXEKWfmiyIMdS9DKcUU-PxGNPwyJBiOXyw,7584
|
32
32
|
dv_flow/mgr/task_output.py,sha256=ZwyvwnYj_gHOEFAEOH3m24Xfc4Cn77hb1j7LkX8_3C4,1086
|
33
33
|
dv_flow/mgr/task_params_ctor.py,sha256=BPkbnoCtzhCxc1g8CJ6VimCcm5UAu92PXeDMhQ4lYsQ,1957
|
34
|
-
dv_flow/mgr/task_run_ctxt.py,sha256=
|
34
|
+
dv_flow/mgr/task_run_ctxt.py,sha256=t2kGR-GbUC3s5YTYLxYmP43LRUvGKjqdGK5clRpAkzw,2624
|
35
35
|
dv_flow/mgr/task_runner.py,sha256=-919VntXAe2XSuFW2dFpgvUre-NkILBnDBbAKBZYn5w,9594
|
36
36
|
dv_flow/mgr/type.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
37
37
|
dv_flow/mgr/type_def.py,sha256=NDeyplKrPnWwEv4yHkhXEMK9d9j39b5MOeLB-1Mchqo,1095
|
@@ -50,9 +50,9 @@ dv_flow/mgr/util/__main__.py,sha256=F0LXpCDpYTPalSo0dc1h_qZkip5v1AZYYh-vcYbh5s0,
|
|
50
50
|
dv_flow/mgr/util/util.py,sha256=yg9oTPRiO87mkCSOQpOtlG9vyKPQzY3qp4OJkEMbWyY,1443
|
51
51
|
dv_flow/mgr/util/cmds/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
52
52
|
dv_flow/mgr/util/cmds/cmd_schema.py,sha256=lrEI-Jwb8j4I4yYOn9hq7_7NYbK8leVxLesrHyEWm-E,1879
|
53
|
-
dv_flow_mgr-0.0.2.
|
54
|
-
dv_flow_mgr-0.0.2.
|
55
|
-
dv_flow_mgr-0.0.2.
|
56
|
-
dv_flow_mgr-0.0.2.
|
57
|
-
dv_flow_mgr-0.0.2.
|
58
|
-
dv_flow_mgr-0.0.2.
|
53
|
+
dv_flow_mgr-0.0.2.14150065664a1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
54
|
+
dv_flow_mgr-0.0.2.14150065664a1.dist-info/METADATA,sha256=9jJBGIp_ylYV8SgeRvZh0P1EcYH4cQHSLaHEF2Mr_QA,13336
|
55
|
+
dv_flow_mgr-0.0.2.14150065664a1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
56
|
+
dv_flow_mgr-0.0.2.14150065664a1.dist-info/entry_points.txt,sha256=1roy8wAFM48LabOvr6jiOw0MUs-qE8X3Vf8YykPazxk,50
|
57
|
+
dv_flow_mgr-0.0.2.14150065664a1.dist-info/top_level.txt,sha256=amfVTkggzYPtWwLqNmRukfz1Buu0pGS2SrYBBLhXm04,8
|
58
|
+
dv_flow_mgr-0.0.2.14150065664a1.dist-info/RECORD,,
|
{dv_flow_mgr-0.0.2.14149347362a1.dist-info → dv_flow_mgr-0.0.2.14150065664a1.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|