fix: workflow as code api improvement

This commit is contained in:
Ruben Fiszel
2024-03-04 20:45:04 +01:00
parent 2c0298a482
commit b2521b7d2c
+4 -2
View File
@@ -882,7 +882,7 @@ def run_script(
def task(*args, **kwargs):
from inspect import signature
def f(func, tag: str | None = None):
if os.environ.get("WM_JOB_ID") is None or os.environ.get("MAIN_OVERRIDE") == func.__name__:
def inner(*args, **kwargs):
@@ -892,7 +892,9 @@ def task(*args, **kwargs):
else:
def inner(*args, **kwargs):
_client=Windmill()
global _client
if _client is None:
_client = Windmill()
w_id = os.environ.get("WM_WORKSPACE")
job_id = os.environ.get("WM_JOB_ID")
f_name = func.__name__