comms: fix atlasbot node count matcher
This commit is contained in:
parent
5f0bc3832d
commit
36f7de76e9
@ -16,7 +16,7 @@ spec:
|
||||
labels:
|
||||
app: atlasbot
|
||||
annotations:
|
||||
checksum/atlasbot-configmap: manual-atlasbot-6
|
||||
checksum/atlasbot-configmap: manual-atlasbot-7
|
||||
vault.hashicorp.com/agent-inject: "true"
|
||||
vault.hashicorp.com/role: "comms"
|
||||
vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret"
|
||||
|
||||
@ -625,10 +625,12 @@ def sync_loop(token: str, room_id: str):
|
||||
continue
|
||||
|
||||
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")):
|
||||
summary = nodes_summary("Atlas")
|
||||
if summary:
|
||||
if not summary:
|
||||
send_msg(token, rid, "I couldn’t reach the cluster API to count nodes. Try again in a moment.")
|
||||
continue
|
||||
send_msg(token, rid, summary)
|
||||
continue
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user