mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-20 00:02:19 +00:00
fix: handle console logs in dedicated workers
This commit is contained in:
@@ -902,12 +902,12 @@ for line in sys.stdin:
|
||||
if type(v).__name__ == 'bytes':
|
||||
res[k] = to_b_64(v)
|
||||
res_json = re.sub(replace_nan, ' null ', json.dumps(res, separators=(',', ':'), default=str).replace('\n', ''))
|
||||
sys.stdout.write(res_json + "\n")
|
||||
sys.stdout.write("wm_res:" + res_json + "\n")
|
||||
except Exception as e:
|
||||
exc_type, exc_value, exc_traceback = sys.exc_info()
|
||||
tb = traceback.format_tb(exc_traceback)
|
||||
err_json = json.dumps({{ "error": {{ "message": str(e), "name": e.__class__.__name__, "stack": '\n'.join(tb[1:]) }} }}, separators=(',', ':'), default=str).replace('\n', '')
|
||||
sys.stdout.write(err_json + "\n")
|
||||
sys.stdout.write("wm_res:" + err_json + "\n")
|
||||
sys.stdout.flush()
|
||||
"#,
|
||||
);
|
||||
@@ -947,6 +947,7 @@ for line in sys.stdin:
|
||||
job_completed_tx,
|
||||
token,
|
||||
jobs_rx,
|
||||
worker_name,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user