ddeutil-workflow 0.0.52__py3-none-any.whl → 0.0.53__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.
- ddeutil/workflow/__about__.py +1 -1
- ddeutil/workflow/job.py +1 -0
- ddeutil/workflow/stages.py +181 -94
- {ddeutil_workflow-0.0.52.dist-info → ddeutil_workflow-0.0.53.dist-info}/METADATA +1 -1
- {ddeutil_workflow-0.0.52.dist-info → ddeutil_workflow-0.0.53.dist-info}/RECORD +8 -8
- {ddeutil_workflow-0.0.52.dist-info → ddeutil_workflow-0.0.53.dist-info}/WHEEL +0 -0
- {ddeutil_workflow-0.0.52.dist-info → ddeutil_workflow-0.0.53.dist-info}/licenses/LICENSE +0 -0
- {ddeutil_workflow-0.0.52.dist-info → ddeutil_workflow-0.0.53.dist-info}/top_level.txt +0 -0
ddeutil/workflow/__about__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__: str = "0.0.
|
1
|
+
__version__: str = "0.0.53"
|
ddeutil/workflow/job.py
CHANGED
ddeutil/workflow/stages.py
CHANGED
@@ -42,7 +42,7 @@ from concurrent.futures import (
|
|
42
42
|
wait,
|
43
43
|
)
|
44
44
|
from datetime import datetime
|
45
|
-
from inspect import Parameter
|
45
|
+
from inspect import Parameter, isclass, isfunction, ismodule
|
46
46
|
from pathlib import Path
|
47
47
|
from subprocess import CompletedProcess
|
48
48
|
from textwrap import dedent
|
@@ -266,7 +266,7 @@ class BaseStage(BaseModel, ABC):
|
|
266
266
|
param2template(self.name, params=to, extras=self.extras)
|
267
267
|
)
|
268
268
|
)
|
269
|
-
|
269
|
+
output: DictData = output.copy()
|
270
270
|
errors: DictData = (
|
271
271
|
{"errors": output.pop("errors", {})} if "errors" in output else {}
|
272
272
|
)
|
@@ -302,7 +302,7 @@ class BaseStage(BaseModel, ABC):
|
|
302
302
|
param2template(self.name, params=outputs, extras=self.extras)
|
303
303
|
)
|
304
304
|
)
|
305
|
-
return outputs.get("stages", {}).get(_id, {})
|
305
|
+
return outputs.get("stages", {}).get(_id, {}).get("outputs", {})
|
306
306
|
|
307
307
|
def is_skipped(self, params: DictData | None = None) -> bool:
|
308
308
|
"""Return true if condition of this stage do not correct. This process
|
@@ -704,12 +704,11 @@ class PyStage(BaseStage):
|
|
704
704
|
|
705
705
|
:rtype: Iterator[str]
|
706
706
|
"""
|
707
|
-
from inspect import isclass, ismodule
|
708
|
-
|
709
707
|
for value in values:
|
710
708
|
|
711
709
|
if (
|
712
710
|
value == "__annotations__"
|
711
|
+
or (value.startswith("__") and value.endswith("__"))
|
713
712
|
or ismodule(values[value])
|
714
713
|
or isclass(values[value])
|
715
714
|
):
|
@@ -727,11 +726,10 @@ class PyStage(BaseStage):
|
|
727
726
|
|
728
727
|
:rtype: DictData
|
729
728
|
"""
|
729
|
+
output: DictData = output.copy()
|
730
730
|
lc: DictData = output.pop("locals", {})
|
731
731
|
gb: DictData = output.pop("globals", {})
|
732
|
-
super().set_outputs(
|
733
|
-
{k: lc[k] for k in self.filter_locals(lc)} | output, to=to
|
734
|
-
)
|
732
|
+
super().set_outputs(lc | output, to=to)
|
735
733
|
to.update({k: gb[k] for k in to if k in gb})
|
736
734
|
return to
|
737
735
|
|
@@ -762,26 +760,36 @@ class PyStage(BaseStage):
|
|
762
760
|
lc: DictData = {}
|
763
761
|
gb: DictData = (
|
764
762
|
globals()
|
765
|
-
| params
|
766
763
|
| param2template(self.vars, params, extras=self.extras)
|
767
764
|
| {"result": result}
|
768
765
|
)
|
769
766
|
|
770
|
-
# NOTE: Start exec the run statement.
|
771
767
|
result.trace.info(f"[STAGE]: Py-Execute: {self.name}")
|
772
|
-
|
773
|
-
# "[STAGE]: This stage allow use `eval` function, so, please "
|
774
|
-
# "check your statement be safe before execute."
|
775
|
-
# )
|
776
|
-
#
|
768
|
+
|
777
769
|
# WARNING: The exec build-in function is very dangerous. So, it
|
778
770
|
# should use the re module to validate exec-string before running.
|
779
771
|
exec(
|
780
|
-
param2template(dedent(self.run), params, extras=self.extras),
|
772
|
+
param2template(dedent(self.run), params, extras=self.extras),
|
773
|
+
gb,
|
774
|
+
lc,
|
781
775
|
)
|
782
776
|
|
783
777
|
return result.catch(
|
784
|
-
status=SUCCESS,
|
778
|
+
status=SUCCESS,
|
779
|
+
context={
|
780
|
+
"locals": {k: lc[k] for k in self.filter_locals(lc)},
|
781
|
+
"globals": {
|
782
|
+
k: gb[k]
|
783
|
+
for k in gb
|
784
|
+
if (
|
785
|
+
not k.startswith("__")
|
786
|
+
and k != "annotations"
|
787
|
+
and not ismodule(gb[k])
|
788
|
+
and not isclass(gb[k])
|
789
|
+
and not isfunction(gb[k])
|
790
|
+
)
|
791
|
+
},
|
792
|
+
},
|
785
793
|
)
|
786
794
|
|
787
795
|
|
@@ -841,8 +849,8 @@ class CallStage(BaseStage):
|
|
841
849
|
|
842
850
|
:raise ValueError: If necessary arguments does not pass from the `args`
|
843
851
|
field.
|
844
|
-
:raise TypeError: If the result from the caller function does not
|
845
|
-
a `dict` type.
|
852
|
+
:raise TypeError: If the result from the caller function does not match
|
853
|
+
with a `dict` type.
|
846
854
|
|
847
855
|
:rtype: Result
|
848
856
|
"""
|
@@ -1099,17 +1107,17 @@ class ParallelStage(BaseStage): # pragma: no cov
|
|
1099
1107
|
:rtype: DictData
|
1100
1108
|
"""
|
1101
1109
|
result.trace.debug(f"... Execute branch: {branch!r}")
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1110
|
+
context: DictData = copy.deepcopy(params)
|
1111
|
+
context.update({"branch": branch})
|
1112
|
+
output: DictData = {"branch": branch, "stages": {}}
|
1105
1113
|
for stage in self.parallel[branch]:
|
1106
1114
|
|
1107
1115
|
if extras:
|
1108
1116
|
stage.extras = extras
|
1109
1117
|
|
1110
|
-
if stage.is_skipped(params=
|
1118
|
+
if stage.is_skipped(params=context):
|
1111
1119
|
result.trace.info(f"... Skip stage: {stage.iden!r}")
|
1112
|
-
stage.set_outputs(output={"skipped": True}, to=
|
1120
|
+
stage.set_outputs(output={"skipped": True}, to=output)
|
1113
1121
|
continue
|
1114
1122
|
|
1115
1123
|
if event and event.is_set():
|
@@ -1122,7 +1130,7 @@ class ParallelStage(BaseStage): # pragma: no cov
|
|
1122
1130
|
parallel={
|
1123
1131
|
branch: {
|
1124
1132
|
"branch": branch,
|
1125
|
-
"stages": filter_func(
|
1133
|
+
"stages": filter_func(output.pop("stages", {})),
|
1126
1134
|
"errors": StageException(error_msg).to_dict(),
|
1127
1135
|
}
|
1128
1136
|
},
|
@@ -1130,14 +1138,15 @@ class ParallelStage(BaseStage): # pragma: no cov
|
|
1130
1138
|
|
1131
1139
|
try:
|
1132
1140
|
rs: Result = stage.handler_execute(
|
1133
|
-
params=
|
1141
|
+
params=context,
|
1134
1142
|
run_id=result.run_id,
|
1135
1143
|
parent_run_id=result.parent_run_id,
|
1136
1144
|
raise_error=True,
|
1137
1145
|
event=event,
|
1138
1146
|
)
|
1139
|
-
stage.set_outputs(rs.context, to=
|
1140
|
-
|
1147
|
+
stage.set_outputs(rs.context, to=output)
|
1148
|
+
stage.set_outputs(stage.get_outputs(output), to=context)
|
1149
|
+
except (StageException, UtilException) as e: # pragma: no cov
|
1141
1150
|
result.trace.error(f"[STAGE]: {e.__class__.__name__}: {e}")
|
1142
1151
|
raise StageException(
|
1143
1152
|
f"Sub-Stage execution error: {e.__class__.__name__}: {e}"
|
@@ -1153,7 +1162,7 @@ class ParallelStage(BaseStage): # pragma: no cov
|
|
1153
1162
|
parallel={
|
1154
1163
|
branch: {
|
1155
1164
|
"branch": branch,
|
1156
|
-
"stages": filter_func(
|
1165
|
+
"stages": filter_func(output.pop("stages", {})),
|
1157
1166
|
"errors": StageException(error_msg).to_dict(),
|
1158
1167
|
},
|
1159
1168
|
},
|
@@ -1164,7 +1173,7 @@ class ParallelStage(BaseStage): # pragma: no cov
|
|
1164
1173
|
parallel={
|
1165
1174
|
branch: {
|
1166
1175
|
"branch": branch,
|
1167
|
-
"stages": filter_func(
|
1176
|
+
"stages": filter_func(output.pop("stages", {})),
|
1168
1177
|
},
|
1169
1178
|
},
|
1170
1179
|
)
|
@@ -1294,18 +1303,18 @@ class ForEachStage(BaseStage):
|
|
1294
1303
|
|
1295
1304
|
:rtype: Result
|
1296
1305
|
"""
|
1297
|
-
result.trace.debug(f"
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1306
|
+
result.trace.debug(f"[STAGE]: Execute item: {item!r}")
|
1307
|
+
context: DictData = copy.deepcopy(params)
|
1308
|
+
context.update({"item": item})
|
1309
|
+
output: DictData = {"item": item, "stages": {}}
|
1301
1310
|
for stage in self.stages:
|
1302
1311
|
|
1303
1312
|
if self.extras:
|
1304
1313
|
stage.extras = self.extras
|
1305
1314
|
|
1306
|
-
if stage.is_skipped(params=
|
1315
|
+
if stage.is_skipped(params=context):
|
1307
1316
|
result.trace.info(f"... Skip stage: {stage.iden!r}")
|
1308
|
-
stage.set_outputs(output={"skipped": True}, to=
|
1317
|
+
stage.set_outputs(output={"skipped": True}, to=output)
|
1309
1318
|
continue
|
1310
1319
|
|
1311
1320
|
if event and event.is_set(): # pragma: no cov
|
@@ -1318,7 +1327,7 @@ class ForEachStage(BaseStage):
|
|
1318
1327
|
foreach={
|
1319
1328
|
item: {
|
1320
1329
|
"item": item,
|
1321
|
-
"stages": filter_func(
|
1330
|
+
"stages": filter_func(output.pop("stages", {})),
|
1322
1331
|
"errors": StageException(error_msg).to_dict(),
|
1323
1332
|
}
|
1324
1333
|
},
|
@@ -1326,13 +1335,14 @@ class ForEachStage(BaseStage):
|
|
1326
1335
|
|
1327
1336
|
try:
|
1328
1337
|
rs: Result = stage.handler_execute(
|
1329
|
-
params=
|
1338
|
+
params=context,
|
1330
1339
|
run_id=result.run_id,
|
1331
1340
|
parent_run_id=result.parent_run_id,
|
1332
1341
|
raise_error=True,
|
1333
1342
|
event=event,
|
1334
1343
|
)
|
1335
|
-
stage.set_outputs(rs.context, to=
|
1344
|
+
stage.set_outputs(rs.context, to=output)
|
1345
|
+
stage.set_outputs(stage.get_outputs(output), to=context)
|
1336
1346
|
except (StageException, UtilException) as e:
|
1337
1347
|
result.trace.error(f"[STAGE]: {e.__class__.__name__}: {e}")
|
1338
1348
|
raise StageException(
|
@@ -1349,18 +1359,17 @@ class ForEachStage(BaseStage):
|
|
1349
1359
|
foreach={
|
1350
1360
|
item: {
|
1351
1361
|
"item": item,
|
1352
|
-
"stages": filter_func(
|
1362
|
+
"stages": filter_func(output.pop("stages", {})),
|
1353
1363
|
"errors": StageException(error_msg).to_dict(),
|
1354
1364
|
},
|
1355
1365
|
},
|
1356
1366
|
)
|
1357
|
-
|
1358
1367
|
return result.catch(
|
1359
1368
|
status=SUCCESS,
|
1360
1369
|
foreach={
|
1361
1370
|
item: {
|
1362
1371
|
"item": item,
|
1363
|
-
"stages": filter_func(
|
1372
|
+
"stages": filter_func(output.pop("stages", {})),
|
1364
1373
|
},
|
1365
1374
|
},
|
1366
1375
|
)
|
@@ -1515,18 +1524,18 @@ class UntilStage(BaseStage): # pragma: no cov
|
|
1515
1524
|
:rtype: tuple[Result, T]
|
1516
1525
|
"""
|
1517
1526
|
result.trace.debug(f"... Execute until item: {item!r}")
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1527
|
+
context: DictData = copy.deepcopy(params)
|
1528
|
+
context.update({"item": item})
|
1529
|
+
output: DictData = {"loop": loop, "item": item, "stages": {}}
|
1521
1530
|
next_item: T = None
|
1522
1531
|
for stage in self.stages:
|
1523
1532
|
|
1524
1533
|
if self.extras:
|
1525
1534
|
stage.extras = self.extras
|
1526
1535
|
|
1527
|
-
if stage.is_skipped(params=
|
1536
|
+
if stage.is_skipped(params=context):
|
1528
1537
|
result.trace.info(f"... Skip stage: {stage.iden!r}")
|
1529
|
-
stage.set_outputs(output={"skipped": True}, to=
|
1538
|
+
stage.set_outputs(output={"skipped": True}, to=output)
|
1530
1539
|
continue
|
1531
1540
|
|
1532
1541
|
if event and event.is_set():
|
@@ -1541,9 +1550,7 @@ class UntilStage(BaseStage): # pragma: no cov
|
|
1541
1550
|
loop: {
|
1542
1551
|
"loop": loop,
|
1543
1552
|
"item": item,
|
1544
|
-
"stages": filter_func(
|
1545
|
-
context.pop("stages", {})
|
1546
|
-
),
|
1553
|
+
"stages": filter_func(output.pop("stages", {})),
|
1547
1554
|
"errors": StageException(error_msg).to_dict(),
|
1548
1555
|
}
|
1549
1556
|
},
|
@@ -1553,17 +1560,18 @@ class UntilStage(BaseStage): # pragma: no cov
|
|
1553
1560
|
|
1554
1561
|
try:
|
1555
1562
|
rs: Result = stage.handler_execute(
|
1556
|
-
params=
|
1563
|
+
params=context,
|
1557
1564
|
run_id=result.run_id,
|
1558
1565
|
parent_run_id=result.parent_run_id,
|
1559
1566
|
raise_error=True,
|
1560
1567
|
event=event,
|
1561
1568
|
)
|
1562
|
-
stage.set_outputs(rs.context, to=
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
1566
|
-
|
1569
|
+
stage.set_outputs(rs.context, to=output)
|
1570
|
+
|
1571
|
+
if "item" in (_output := stage.get_outputs(output)):
|
1572
|
+
next_item = _output["item"]
|
1573
|
+
|
1574
|
+
stage.set_outputs(_output, to=context)
|
1567
1575
|
except (StageException, UtilException) as e:
|
1568
1576
|
result.trace.error(f"[STAGE]: {e.__class__.__name__}: {e}")
|
1569
1577
|
raise StageException(
|
@@ -1577,7 +1585,7 @@ class UntilStage(BaseStage): # pragma: no cov
|
|
1577
1585
|
loop: {
|
1578
1586
|
"loop": loop,
|
1579
1587
|
"item": item,
|
1580
|
-
"stages": filter_func(
|
1588
|
+
"stages": filter_func(output.pop("stages", {})),
|
1581
1589
|
}
|
1582
1590
|
},
|
1583
1591
|
),
|
@@ -1672,7 +1680,9 @@ class Match(BaseModel):
|
|
1672
1680
|
"""Match model for the Case Stage."""
|
1673
1681
|
|
1674
1682
|
case: Union[str, int] = Field(description="A match case.")
|
1675
|
-
|
1683
|
+
stages: list[Stage] = Field(
|
1684
|
+
description="A list of stage to execution for this case."
|
1685
|
+
)
|
1676
1686
|
|
1677
1687
|
|
1678
1688
|
class CaseStage(BaseStage):
|
@@ -1685,24 +1695,21 @@ class CaseStage(BaseStage):
|
|
1685
1695
|
... "match": [
|
1686
1696
|
... {
|
1687
1697
|
... "case": "1",
|
1688
|
-
... "
|
1689
|
-
...
|
1690
|
-
...
|
1691
|
-
...
|
1692
|
-
...
|
1693
|
-
...
|
1694
|
-
... "case": "2",
|
1695
|
-
... "stage": {
|
1696
|
-
... "name": "Stage case 2",
|
1697
|
-
... "eche": "Hello case 2",
|
1698
|
-
... },
|
1698
|
+
... "stages": [
|
1699
|
+
... {
|
1700
|
+
... "name": "Stage case 1",
|
1701
|
+
... "eche": "Hello case 1",
|
1702
|
+
... },
|
1703
|
+
... ],
|
1699
1704
|
... },
|
1700
1705
|
... {
|
1701
1706
|
... "case": "_",
|
1702
|
-
... "
|
1703
|
-
...
|
1704
|
-
...
|
1705
|
-
...
|
1707
|
+
... "stages": [
|
1708
|
+
... {
|
1709
|
+
... "name": "Stage else",
|
1710
|
+
... "eche": "Hello case else",
|
1711
|
+
... },
|
1712
|
+
... ],
|
1706
1713
|
... },
|
1707
1714
|
... ],
|
1708
1715
|
... }
|
@@ -1722,6 +1729,98 @@ class CaseStage(BaseStage):
|
|
1722
1729
|
alias="skip-not-match",
|
1723
1730
|
)
|
1724
1731
|
|
1732
|
+
def execute_case(
|
1733
|
+
self,
|
1734
|
+
case: str,
|
1735
|
+
stages: list[Stage],
|
1736
|
+
params: DictData,
|
1737
|
+
result: Result,
|
1738
|
+
*,
|
1739
|
+
event: Event | None = None,
|
1740
|
+
) -> Result:
|
1741
|
+
"""Execute case.
|
1742
|
+
|
1743
|
+
:param case: (str) A case that want to execution.
|
1744
|
+
:param stages: (list[Stage]) A list of stage.
|
1745
|
+
:param params: (DictData) A parameter that want to pass to stage
|
1746
|
+
execution.
|
1747
|
+
:param result: (Result) A result object for keeping context and status
|
1748
|
+
data.
|
1749
|
+
:param event: (Event) An event manager that use to track parent execute
|
1750
|
+
was not force stopped.
|
1751
|
+
|
1752
|
+
:rtype: Result
|
1753
|
+
"""
|
1754
|
+
context: DictData = copy.deepcopy(params)
|
1755
|
+
context.update({"case": case})
|
1756
|
+
output: DictData = {"case": case, "stages": {}}
|
1757
|
+
|
1758
|
+
for stage in stages:
|
1759
|
+
|
1760
|
+
if self.extras:
|
1761
|
+
stage.extras = self.extras
|
1762
|
+
|
1763
|
+
if stage.is_skipped(params=context):
|
1764
|
+
result.trace.info(f"... Skip stage: {stage.iden!r}")
|
1765
|
+
stage.set_outputs(output={"skipped": True}, to=output)
|
1766
|
+
continue
|
1767
|
+
|
1768
|
+
if event and event.is_set(): # pragma: no cov
|
1769
|
+
error_msg: str = (
|
1770
|
+
"Case-Stage was canceled from event that had set before "
|
1771
|
+
"stage case execution."
|
1772
|
+
)
|
1773
|
+
return result.catch(
|
1774
|
+
status=CANCEL,
|
1775
|
+
context={
|
1776
|
+
"case": case,
|
1777
|
+
"stages": filter_func(output.pop("stages", {})),
|
1778
|
+
"errors": StageException(error_msg).to_dict(),
|
1779
|
+
},
|
1780
|
+
)
|
1781
|
+
|
1782
|
+
try:
|
1783
|
+
rs: Result = stage.handler_execute(
|
1784
|
+
params=context,
|
1785
|
+
run_id=result.run_id,
|
1786
|
+
parent_run_id=result.parent_run_id,
|
1787
|
+
raise_error=True,
|
1788
|
+
event=event,
|
1789
|
+
)
|
1790
|
+
stage.set_outputs(rs.context, to=output)
|
1791
|
+
stage.set_outputs(stage.get_outputs(output), to=context)
|
1792
|
+
except (StageException, UtilException) as e: # pragma: no cov
|
1793
|
+
result.trace.error(f"[STAGE]: {e.__class__.__name__}: {e}")
|
1794
|
+
return result.catch(
|
1795
|
+
status=FAILED,
|
1796
|
+
context={
|
1797
|
+
"case": case,
|
1798
|
+
"stages": filter_func(output.pop("stages", {})),
|
1799
|
+
"errors": e.to_dict(),
|
1800
|
+
},
|
1801
|
+
)
|
1802
|
+
|
1803
|
+
if rs.status == FAILED:
|
1804
|
+
error_msg: str = (
|
1805
|
+
f"Case-Stage was break because it has a sub stage, "
|
1806
|
+
f"{stage.iden}, failed without raise error."
|
1807
|
+
)
|
1808
|
+
return result.catch(
|
1809
|
+
status=FAILED,
|
1810
|
+
context={
|
1811
|
+
"case": case,
|
1812
|
+
"stages": filter_func(output.pop("stages", {})),
|
1813
|
+
"errors": StageException(error_msg).to_dict(),
|
1814
|
+
},
|
1815
|
+
)
|
1816
|
+
return result.catch(
|
1817
|
+
status=SUCCESS,
|
1818
|
+
context={
|
1819
|
+
"case": case,
|
1820
|
+
"stages": filter_func(output.pop("stages", {})),
|
1821
|
+
},
|
1822
|
+
)
|
1823
|
+
|
1725
1824
|
def execute(
|
1726
1825
|
self,
|
1727
1826
|
params: DictData,
|
@@ -1751,17 +1850,17 @@ class CaseStage(BaseStage):
|
|
1751
1850
|
|
1752
1851
|
result.trace.info(f"[STAGE]: Case-Execute: {_case!r}.")
|
1753
1852
|
_else: Optional[Match] = None
|
1754
|
-
|
1853
|
+
stages: Optional[list[Stage]] = None
|
1755
1854
|
for match in self.match:
|
1756
1855
|
if (c := match.case) == "_":
|
1757
1856
|
_else: Match = match
|
1758
1857
|
continue
|
1759
1858
|
|
1760
1859
|
_condition: str = param2template(c, params, extras=self.extras)
|
1761
|
-
if
|
1762
|
-
|
1860
|
+
if stages is None and _case == _condition:
|
1861
|
+
stages: list[Stage] = match.stages
|
1763
1862
|
|
1764
|
-
if
|
1863
|
+
if stages is None:
|
1765
1864
|
if _else is None:
|
1766
1865
|
if not self.skip_not_match:
|
1767
1866
|
raise StageException(
|
@@ -1779,10 +1878,8 @@ class CaseStage(BaseStage):
|
|
1779
1878
|
status=CANCEL,
|
1780
1879
|
context={"errors": StageException(error_msg).to_dict()},
|
1781
1880
|
)
|
1782
|
-
|
1783
|
-
|
1784
|
-
if self.extras:
|
1785
|
-
stage.extras = self.extras
|
1881
|
+
_case: str = "_"
|
1882
|
+
stages: list[Stage] = _else.stages
|
1786
1883
|
|
1787
1884
|
if event and event.is_set(): # pragma: no cov
|
1788
1885
|
return result.catch(
|
@@ -1795,19 +1892,9 @@ class CaseStage(BaseStage):
|
|
1795
1892
|
},
|
1796
1893
|
)
|
1797
1894
|
|
1798
|
-
|
1799
|
-
|
1800
|
-
|
1801
|
-
context=stage.handler_execute(
|
1802
|
-
params=params,
|
1803
|
-
run_id=result.run_id,
|
1804
|
-
parent_run_id=result.parent_run_id,
|
1805
|
-
event=event,
|
1806
|
-
).context,
|
1807
|
-
)
|
1808
|
-
except StageException as e: # pragma: no cov
|
1809
|
-
result.trace.error(f"[STAGE]: {e.__class__.__name__}:" f"\n\t{e}")
|
1810
|
-
return result.catch(status=FAILED, context={"errors": e.to_dict()})
|
1895
|
+
return self.execute_case(
|
1896
|
+
case=_case, stages=stages, params=params, result=result, event=event
|
1897
|
+
)
|
1811
1898
|
|
1812
1899
|
|
1813
1900
|
class RaiseStage(BaseStage): # pragma: no cov
|
@@ -1,4 +1,4 @@
|
|
1
|
-
ddeutil/workflow/__about__.py,sha256=
|
1
|
+
ddeutil/workflow/__about__.py,sha256=fOQi-49Q8-qLVO7us5t2StkrubZvI2LQkyYSQi-3P88,28
|
2
2
|
ddeutil/workflow/__cron.py,sha256=h8rLeIUAAEB2SdZ4Jhch7LU1Yl3bbJ-iNNJ3tQ0eYVM,28095
|
3
3
|
ddeutil/workflow/__init__.py,sha256=noE8LNRcgq32m9OnIFcQqh0P7PXWdp-SGmvBCYIXgf4,1338
|
4
4
|
ddeutil/workflow/__main__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -6,13 +6,13 @@ ddeutil/workflow/__types.py,sha256=8jBdbfb3aZSetjz0mvNrpGHwwxJff7mK8_4v41cLqlc,4
|
|
6
6
|
ddeutil/workflow/conf.py,sha256=80rgmJKFU7BlH5xTLnghGzGhE8C6LFAQykd9mjHSjo8,12528
|
7
7
|
ddeutil/workflow/cron.py,sha256=WS2MInn0Sp5DKlZDZH5VFZ5AA0Q3_AnBnYEU4lZSv4I,9779
|
8
8
|
ddeutil/workflow/exceptions.py,sha256=r4Jrf9qtVPALU4wh4bnb_OYqC-StqSQJEmFC-_QK934,1408
|
9
|
-
ddeutil/workflow/job.py,sha256=
|
9
|
+
ddeutil/workflow/job.py,sha256=Z1XP_9pj-RY64z3G4LYX-MppS99zQns9wtZy7zHuWbE,35262
|
10
10
|
ddeutil/workflow/logs.py,sha256=rsoBrUGQrooou18fg2yvPsB8NOaXnUA5ThQpBr_WVMg,26598
|
11
11
|
ddeutil/workflow/params.py,sha256=FKY4Oo1Ze4QZKRfAk7rqKsi44YaJQAbqAtXM6vlO2hI,11392
|
12
12
|
ddeutil/workflow/result.py,sha256=27nPQq9CETLCVczv4vvFEF9w2TllHZ_ROfyDoLFxRWM,5647
|
13
13
|
ddeutil/workflow/reusables.py,sha256=iXcS7Gg-71qVX4ln0ILTDx03cTtUnj_rNoXHTVdVrxc,17636
|
14
14
|
ddeutil/workflow/scheduler.py,sha256=4G5AogkmnsTKe7jKYSfU35qjubR82WQ8CLtEe9kqPTE,28304
|
15
|
-
ddeutil/workflow/stages.py,sha256=
|
15
|
+
ddeutil/workflow/stages.py,sha256=ZsGh8Wd-NqdAZC5cyJ6wXuF-UHqoCcFFedXvyHssSqc,72473
|
16
16
|
ddeutil/workflow/utils.py,sha256=zbVttaMFMRLuuBJdSJf7D9qtz8bOnQIBq-rHI3Eqy4M,7821
|
17
17
|
ddeutil/workflow/workflow.py,sha256=2ZBNW3-vcP8bpKrK184wSCukq3wpT6G0z25Su5bapR0,50832
|
18
18
|
ddeutil/workflow/api/__init__.py,sha256=F53NMBWtb9IKaDWkPU5KvybGGfKAcbehgn6TLBwHuuM,21
|
@@ -24,8 +24,8 @@ ddeutil/workflow/api/routes/job.py,sha256=oPwBVP0Mxwxv-bGPlfmxQQ9PcVl0ev9HoPzndp
|
|
24
24
|
ddeutil/workflow/api/routes/logs.py,sha256=U6vOni3wd-ZTOwd3yVdSOpgyRmNdcgfngU5KlLM3Cww,5383
|
25
25
|
ddeutil/workflow/api/routes/schedules.py,sha256=EgUjyRGhsm6UNaMj5luh6TcY6l571sCHcla-BL1iOfY,4829
|
26
26
|
ddeutil/workflow/api/routes/workflows.py,sha256=JcDOrn1deK8ztFRcMTNATQejG6KMA7JxZLVc4QeBsP4,4527
|
27
|
-
ddeutil_workflow-0.0.
|
28
|
-
ddeutil_workflow-0.0.
|
29
|
-
ddeutil_workflow-0.0.
|
30
|
-
ddeutil_workflow-0.0.
|
31
|
-
ddeutil_workflow-0.0.
|
27
|
+
ddeutil_workflow-0.0.53.dist-info/licenses/LICENSE,sha256=nGFZ1QEhhhWeMHf9n99_fdt4vQaXS29xWKxt-OcLywk,1085
|
28
|
+
ddeutil_workflow-0.0.53.dist-info/METADATA,sha256=xNgYIlFQvS9VsF0agSPsYbJWin_s9c_llkRFnEUxyC0,19425
|
29
|
+
ddeutil_workflow-0.0.53.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
30
|
+
ddeutil_workflow-0.0.53.dist-info/top_level.txt,sha256=m9M6XeSWDwt_yMsmH6gcOjHZVK5O0-vgtNBuncHjzW4,8
|
31
|
+
ddeutil_workflow-0.0.53.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|