wmill 1.394.2__py3-none-any.whl → 1.394.4__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
wmill/client.py CHANGED
@@ -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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wmill
3
- Version: 1.394.2
3
+ Version: 1.394.4
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,8 +1,8 @@
1
1
  wmill/__init__.py,sha256=nGZnQPezTdrBnBW1D0JqUtm75Gdf_xi3tAcPGwHRZ5A,46
2
- wmill/client.py,sha256=rZM2XCU4P45RJqz_TgNt5Jeek72Cxo78MEME5-mCp6s,32337
2
+ wmill/client.py,sha256=wHMpt-K1a1I-9-Hhby9PDL-XmkyGu4qoX2g_WM5s8NY,33045
3
3
  wmill/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
4
4
  wmill/s3_reader.py,sha256=izHlg2Xsg0Sr_LkDDEC35VuEijJcuPBDIm-xj21KsgU,1668
5
5
  wmill/s3_types.py,sha256=XVjPyc5sjWesTy6nnRReojhyPgPsaT0EY3X57mWUaJ4,1173
6
- wmill-1.394.2.dist-info/METADATA,sha256=4Hnx7EYvuJJF-FLg0Z-Gc2RlWoByqTcIeVjaYQu80yw,2693
7
- wmill-1.394.2.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
8
- wmill-1.394.2.dist-info/RECORD,,
6
+ wmill-1.394.4.dist-info/METADATA,sha256=SoyBOlIxD-rqetGDOdGGcyv9b6085z31aYKPj-gxSmk,2693
7
+ wmill-1.394.4.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
8
+ wmill-1.394.4.dist-info/RECORD,,