mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-19 00:02:03 +00:00
fix polar handling
This commit is contained in:
@@ -1398,7 +1398,6 @@ pub async fn run_wait_result_job_by_path_get(
|
||||
Path((w_id, script_path)): Path<(String, StripPath)>,
|
||||
Query(run_query): Query<RunJobQuery>,
|
||||
) -> error::JsonResult<serde_json::Value> {
|
||||
tracing::error!("run_wait_result_job_by_path_get {:#?}", run_query.payload);
|
||||
let payload_r = run_query
|
||||
.payload
|
||||
.map(decode_payload)
|
||||
|
||||
@@ -1918,8 +1918,12 @@ for k, v in list(args.items()):
|
||||
|
||||
try:
|
||||
res = inner_script.main(**args)
|
||||
if type(res).__name__ == 'DataFrame':
|
||||
res = res.values.tolist()
|
||||
typ = type(res)
|
||||
if typ.__name__ == 'DataFrame':
|
||||
if typ.__module__ == 'pandas.core.frame':
|
||||
res = res.values.tolist()
|
||||
elif typ.__module__ == 'polars.dataframe.frame':
|
||||
res = res.rows()
|
||||
res_json = json.dumps(res, separators=(',', ':'), default=str).replace('\n', '')
|
||||
with open("result.json", 'w') as f:
|
||||
f.write(res_json)
|
||||
|
||||
Reference in New Issue
Block a user