diff --git a/backend/sqlx-data.json b/backend/sqlx-data.json index 950c688b56..f1bd61b9e5 100644 --- a/backend/sqlx-data.json +++ b/backend/sqlx-data.json @@ -3450,6 +3450,27 @@ }, "query": "UPDATE schedule SET path = $1, script_path = $1 WHERE path = $2 AND workspace_id = $3 AND is_flow IS true RETURNING *" }, + "913c634de21d46b8841f8a7c25c408da7c572f9e685db6351848cbf6e9253efc": { + "describe": { + "columns": [ + { + "name": "canceled", + "ordinal": 0, + "type_info": "Bool" + } + ], + "nullable": [ + false + ], + "parameters": { + "Left": [ + "Int4", + "Uuid" + ] + } + }, + "query": "UPDATE queue SET mem_peak = GREATEST($1, mem_peak), last_ping = now() WHERE id = $2 RETURNING canceled" + }, "924e1d5cbb682db0d6121dd911f38cf8948d0e59ca47428daa4f43fce686ba80": { "describe": { "columns": [ @@ -4148,27 +4169,6 @@ }, "query": "\n SELECT resume_id, approver\n FROM resume_job\n WHERE job = $1\n " }, - "b020869f68b5f2febbb28e8d2ba08e126cb2038d7d94ae74d47824a0cf7d7655": { - "describe": { - "columns": [ - { - "name": "canceled", - "ordinal": 0, - "type_info": "Bool" - } - ], - "nullable": [ - false - ], - "parameters": { - "Left": [ - "Int4", - "Uuid" - ] - } - }, - "query": "UPDATE queue SET mem_peak = COALESCE($1, mem_peak), last_ping = now() WHERE id = $2 RETURNING canceled" - }, "b053117536c067095e2fb2864ce5af33f84b22c24c92fcb870f37f0501f8ea9a": { "describe": { "columns": [ diff --git a/backend/windmill-worker/src/worker.rs b/backend/windmill-worker/src/worker.rs index a06022aaa1..11031b1371 100644 --- a/backend/windmill-worker/src/worker.rs +++ b/backend/windmill-worker/src/worker.rs @@ -2322,7 +2322,7 @@ async fn get_mem_peak(pid: Option, nsjail: bool) -> i32 { if let Ok(file) = File::open(format!("/proc/{}/status", pid)).await { let mut lines = BufReader::new(file).lines(); while let Some(line) = lines.next_line().await.unwrap_or(None) { - if line.starts_with("VmPeak:") { + if line.starts_with("VmHWM:") { return line.split_whitespace().nth(1).and_then(|s| s.parse::().ok()).unwrap_or(-1); }; }