wmill 1.394.2__tar.gz → 1.394.4__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {wmill-1.394.2 → wmill-1.394.4}/PKG-INFO +1 -1
- {wmill-1.394.2 → wmill-1.394.4}/pyproject.toml +1 -1
- {wmill-1.394.2 → wmill-1.394.4}/wmill/client.py +14 -4
- {wmill-1.394.2 → wmill-1.394.4}/README.md +0 -0
- {wmill-1.394.2 → wmill-1.394.4}/wmill/__init__.py +0 -0
- {wmill-1.394.2 → wmill-1.394.4}/wmill/py.typed +0 -0
- {wmill-1.394.2 → wmill-1.394.4}/wmill/s3_reader.py +0 -0
- {wmill-1.394.2 → wmill-1.394.4}/wmill/s3_types.py +0 -0
@@ -108,14 +108,19 @@ class Windmill:
|
|
108
108
|
path: str,
|
109
109
|
args: dict = None,
|
110
110
|
scheduled_in_secs: int = None,
|
111
|
+
# can only be set to false if this the job will be fully await and not concurrent with any other job
|
112
|
+
# as otherwise the child flow and its own child will store their state in the parent job which will
|
113
|
+
# lead to incorrectness and failures
|
114
|
+
do_not_track_in_parent: bool = True,
|
111
115
|
) -> str:
|
112
116
|
"""Create a flow job and return its job id."""
|
113
117
|
args = args or {}
|
114
118
|
params = {"scheduled_in_secs": scheduled_in_secs} if scheduled_in_secs else {}
|
115
|
-
if
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
+
if not do_not_track_in_parent:
|
120
|
+
if os.environ.get("WM_JOB_ID"):
|
121
|
+
params["parent_job"] = os.environ.get("WM_JOB_ID")
|
122
|
+
if os.environ.get("WM_ROOT_FLOW_JOB_ID"):
|
123
|
+
params["root_job"] = os.environ.get("WM_ROOT_FLOW_JOB_ID")
|
119
124
|
if path:
|
120
125
|
endpoint = f"/w/{self.workspace}/jobs/run/f/{path}"
|
121
126
|
else:
|
@@ -655,11 +660,16 @@ def run_flow_async(
|
|
655
660
|
path: str,
|
656
661
|
args: Dict[str, Any] = None,
|
657
662
|
scheduled_in_secs: int = None,
|
663
|
+
# can only be set to false if this the job will be fully await and not concurrent with any other job
|
664
|
+
# as otherwise the child flow and its own child will store their state in the parent job which will
|
665
|
+
# lead to incorrectness and failures
|
666
|
+
do_not_track_in_parent: bool = True,
|
658
667
|
) -> str:
|
659
668
|
return _client.run_flow_async(
|
660
669
|
path=path,
|
661
670
|
args=args,
|
662
671
|
scheduled_in_secs=scheduled_in_secs,
|
672
|
+
do_not_track_in_parent=do_not_track_in_parent,
|
663
673
|
)
|
664
674
|
|
665
675
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|