cgroups only on linux

This commit is contained in:
Ruben Fiszel
2025-12-19 12:48:15 +00:00
parent e347dba31f
commit a319f187dd
+3
View File
@@ -71,6 +71,7 @@ use windmill_common::worker::CLOUD_HOSTED;
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))]
use monitor::monitor_mem;
#[cfg(any(target_os = "linux"))]
use crate::cgroups::disable_oom_group;
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))]
@@ -511,10 +512,12 @@ async fn windmill_main() -> anyhow::Result<()> {
let worker_mode = num_workers > 0;
if worker_mode {
#[cfg(any(target_os = "linux"))]
if let Err(e) = disable_oom_group() {
tracing::warn!("failed to disable oom group: {:?}", e);
}
}
let conn = if mode == Mode::Agent {
conn
} else {