Problem
Setting quiet_start and quiet_end to the same value (e.g., both 0) results in compression never running, because _is_quiet_time() evaluates an empty range:
if self.quiet_start <= self.quiet_end:
return self.quiet_start <= current_hour < self.quiet_end
0 <= current_hour < 0 is always False.
This is logically correct (zero-length window = no window), but it's a silent failure that's easy to hit when trying to configure "always on" compression.
Proposed fix
- Add a warning log at startup if
quiet_start == quiet_end, since this effectively disables compression
- Document that
quiet_start=0, quiet_end=24 is how to enable 24/7 compression
Context
Hit this in production on mj41 and mj43 (HAM-82). Compression was accidentally disabled for ~24 hours.
Problem
Setting
quiet_startandquiet_endto the same value (e.g., both 0) results in compression never running, because_is_quiet_time()evaluates an empty range:0 <= current_hour < 0is always False.This is logically correct (zero-length window = no window), but it's a silent failure that's easy to hit when trying to configure "always on" compression.
Proposed fix
quiet_start == quiet_end, since this effectively disables compressionquiet_start=0, quiet_end=24is how to enable 24/7 compressionContext
Hit this in production on mj41 and mj43 (HAM-82). Compression was accidentally disabled for ~24 hours.