diff --git a/changes/3174.fix.md b/changes/3174.fix.md new file mode 100644 index 0000000000..c043ecb8c6 --- /dev/null +++ b/changes/3174.fix.md @@ -0,0 +1 @@ +Fix service not started when `[logging].rotation-size` config is set diff --git a/src/ai/backend/logging/types.py b/src/ai/backend/logging/types.py index 57ad25ab23..44a37e1578 100644 --- a/src/ai/backend/logging/types.py +++ b/src/ai/backend/logging/types.py @@ -124,8 +124,10 @@ class SimpleBinarySizeTrafaret(t.Trafaret): } endings = ("ibytes", "ibyte", "ib", "bytes", "byte", "b") - def check_and_return(self, value: str) -> int: + def check_and_return(self, value: str | int) -> int: orig_value = value + if isinstance(value, int): + return value value = value.strip().replace("_", "") try: return int(value)