wmill 1.394.2__tar.gz → 1.394.3__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wmill
3
- Version: 1.394.2
3
+ Version: 1.394.3
4
4
  Summary: A client library for accessing Windmill server wrapping the Windmill client API
5
5
  Home-page: https://windmill.dev
6
6
  License: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "wmill"
3
- version = "1.394.2"
3
+ version = "1.394.3"
4
4
  description = "A client library for accessing Windmill server wrapping the Windmill client API"
5
5
  license = "Apache-2.0"
6
6
  homepage = "https://windmill.dev"
@@ -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 os.environ.get("WM_JOB_ID"):
116
- params["parent_job"] = os.environ.get("WM_JOB_ID")
117
- if os.environ.get("WM_ROOT_FLOW_JOB_ID"):
118
- params["root_job"] = os.environ.get("WM_ROOT_FLOW_JOB_ID")
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