mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-19 00:02:03 +00:00
Fix references to Windmill.start_script_async (#2685)
This commit is contained in:
committed by
GitHub
parent
2859bbe7b4
commit
9783abba0a
@@ -112,7 +112,7 @@ class Windmill:
|
||||
|
||||
start_time = time.time()
|
||||
|
||||
job_id = self.start_execution(path=path, hash_=hash_, args=args)
|
||||
job_id = self.run_script_async(path=path, hash_=hash_, args=args)
|
||||
|
||||
def cancel_job():
|
||||
logger.warning(f"cancelling job: {job_id}")
|
||||
@@ -190,7 +190,10 @@ class Windmill:
|
||||
return result
|
||||
|
||||
def get_job_status(self, job_id: str) -> JobStatus:
|
||||
resp = self.get(f"/w/{self.workspace}/jobs_u/get/{job_id}", raise_for_status=False)
|
||||
resp = self.get(
|
||||
f"/w/{self.workspace}/jobs_u/get/{job_id}",
|
||||
raise_for_status=False,
|
||||
)
|
||||
assert not resp.status_code == 404, f"{job_id} not found"
|
||||
resp_json = resp.json()
|
||||
job_type = resp_json.get("type", "")
|
||||
@@ -447,7 +450,7 @@ def run_script_async(
|
||||
args: Dict[str, Any] = None,
|
||||
scheduled_in_secs: int = None,
|
||||
) -> str:
|
||||
return _client.start_execution(
|
||||
return _client.run_script_async(
|
||||
hash_=hash,
|
||||
args=args,
|
||||
scheduled_in_secs=scheduled_in_secs,
|
||||
@@ -479,7 +482,7 @@ def run_script_by_path_async(
|
||||
args: Dict[str, Any] = None,
|
||||
scheduled_in_secs: Union[None, int] = None,
|
||||
) -> str:
|
||||
return _client.start_execution(
|
||||
return _client.run_script_async(
|
||||
path=path,
|
||||
args=args,
|
||||
scheduled_in_secs=scheduled_in_secs,
|
||||
@@ -558,6 +561,7 @@ def get_resource(
|
||||
"""Get resource from Windmill"""
|
||||
return _client.get_resource(path, none_if_undefined)
|
||||
|
||||
|
||||
@init_global_client
|
||||
def set_resource(**kwargs) -> None:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user