comms: fix atlasbot node count matcher
This commit is contained in:
parent
5f0bc3832d
commit
36f7de76e9
@ -16,7 +16,7 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: atlasbot
|
app: atlasbot
|
||||||
annotations:
|
annotations:
|
||||||
checksum/atlasbot-configmap: manual-atlasbot-6
|
checksum/atlasbot-configmap: manual-atlasbot-7
|
||||||
vault.hashicorp.com/agent-inject: "true"
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
vault.hashicorp.com/role: "comms"
|
vault.hashicorp.com/role: "comms"
|
||||||
vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret"
|
vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret"
|
||||||
|
|||||||
@ -625,12 +625,14 @@ def sync_loop(token: str, room_id: str):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
lower_body = body.lower()
|
lower_body = body.lower()
|
||||||
if re.search(r"\\bhow many nodes\\b|\\bnode count\\b|\\bnumber of nodes\\b", lower_body):
|
if re.search(r"\bhow many nodes\b|\bnode count\b|\bnumber of nodes\b", lower_body):
|
||||||
if any(word in lower_body for word in ("cluster", "atlas", "titan")):
|
if any(word in lower_body for word in ("cluster", "atlas", "titan")):
|
||||||
summary = nodes_summary("Atlas")
|
summary = nodes_summary("Atlas")
|
||||||
if summary:
|
if not summary:
|
||||||
send_msg(token, rid, summary)
|
send_msg(token, rid, "I couldn’t reach the cluster API to count nodes. Try again in a moment.")
|
||||||
continue
|
continue
|
||||||
|
send_msg(token, rid, summary)
|
||||||
|
continue
|
||||||
|
|
||||||
# Only do live cluster/metrics introspection in DMs.
|
# Only do live cluster/metrics introspection in DMs.
|
||||||
allow_tools = is_dm
|
allow_tools = is_dm
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user