Skip to content

Commit

Permalink
fixed: media gateway wrong cpu and memory compare (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
giangndm committed May 29, 2024
1 parent bcc13fa commit 1ccfa12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/media_gateway/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl GatewayStore {
}

fn node_usage(ping: &PingEvent, max_cpu: u8, max_memory: u8, max_disk: u8) -> Option<u8> {
if ping.memory >= max_cpu {
if ping.cpu >= max_cpu {
return None;
}

Expand All @@ -114,7 +114,7 @@ fn node_usage(ping: &PingEvent, max_cpu: u8, max_memory: u8, max_disk: u8) -> Op
}

fn webrtc_usage(ping: &PingEvent, max_cpu: u8, max_memory: u8, max_disk: u8) -> Option<u8> {
if ping.memory >= max_cpu {
if ping.cpu >= max_cpu {
return None;
}

Expand Down

0 comments on commit 1ccfa12

Please sign in to comment.