fix(discord): scope the event-silence knob warning to its dimension
`_warn_liveness_config_disabled` told operators an unusable value turns off "the websocket liveness probe". That is true for the interval, threshold, ack-age and latency knobs, which sit in the probe's startup guard, but `websocket_event_max_silence_seconds` is only checked inside `_read_websocket_health`, so ack-age/latency keep guarding. Say so, or an operator reading the log would believe the whole watchdog is down.
This commit is contained in:
@@ -1130,10 +1130,17 @@ class DiscordAdapter(DiscordMediaMixin, BasePlatformAdapter):
|
||||
watchdog off with no log line — indistinguishable from "the watchdog missed it".
|
||||
An explicit ``0`` is an intentional opt-out and stays silent.
|
||||
"""
|
||||
# This knob gates one dimension inside the health check, not the probe's startup
|
||||
# guard, so an unusable value leaves ack-age/latency guarding (see _read_websocket_health).
|
||||
scope = (
|
||||
"the event-silence dimension of the websocket liveness probe"
|
||||
if key == "websocket_event_max_silence_seconds"
|
||||
else "the websocket liveness probe"
|
||||
)
|
||||
logger.warning(
|
||||
"[%s] Discord liveness knob %s=%r is not a usable positive number; "
|
||||
"the websocket liveness probe is disabled by this value",
|
||||
self.name, key, raw,
|
||||
"%s is disabled by this value",
|
||||
self.name, key, raw, scope,
|
||||
)
|
||||
|
||||
def _liveness_knob(self, key: str, default: Any, cast: type, *, env_key: Optional[str] = None):
|
||||
|
||||
Reference in New Issue
Block a user