network: debounce nmcli monitor events

Batch rapid nmcli monitor events with a 200ms debounce timer
instead of spawning processes on every event line.
This commit is contained in:
2 * r + 2 * t 2026-03-12 21:50:26 +11:00
parent 30c36e356d
commit 11f5a2ee45

View file

@ -309,16 +309,23 @@ Singleton {
return octets.join("."); return octets.join(".");
} }
Process { Timer {
running: true id: monitorDebounce
command: ["nmcli", "m"]
stdout: SplitParser { interval: 200
onRead: { onTriggered: {
Nmcli.getNetworks(() => { Nmcli.getNetworks(() => {
syncNetworksFromNmcli(); syncNetworksFromNmcli();
}); });
getEthernetDevices(); getEthernetDevices();
} }
} }
Process {
running: true
command: ["nmcli", "m"]
stdout: SplitParser {
onRead: monitorDebounce.start()
}
} }
} }