Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion aws_advanced_python_wrapper/limitless_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from __future__ import annotations

import copy
import math
import time
from contextlib import closing
from threading import Event, RLock, Thread
Expand Down Expand Up @@ -248,7 +249,7 @@ def _create_host_info(self, result: Tuple[Any, Any], host_port_to_map: int) -> H
host_name: str = result[0]
cpu: float = float(result[1])

weight: int = round(10 - (cpu * 10))
weight: int = 10 - math.floor(cpu * 10)
if weight < 1 or weight > 10:
weight = 1
logger.debug("LimitlessRouterMonitor.InvalidRouterLoad", host_name, cpu)
Expand Down