From 97e7c69244e363d1d1affe7fe72c07bffb5f43cf Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Thu, 8 Jan 2026 04:22:21 -0300 Subject: [PATCH] comms: retry atlasbot login --- services/comms/atlasbot-configmap.yaml | 12 +++++++++++- services/comms/atlasbot-deployment.yaml | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/services/comms/atlasbot-configmap.yaml b/services/comms/atlasbot-configmap.yaml index d8e74e8..14eb75c 100644 --- a/services/comms/atlasbot-configmap.yaml +++ b/services/comms/atlasbot-configmap.yaml @@ -604,9 +604,19 @@ data: reply = ollama_reply(hist_key, body, context=context) send_msg(token, rid, reply) + def login_with_retry(): + last_err = None + for attempt in range(10): + try: + return login() + except Exception as exc: # noqa: BLE001 + last_err = exc + time.sleep(min(30, 2 ** attempt)) + raise last_err + def main(): load_kb() - token = login() + token = login_with_retry() try: room_id = resolve_alias(token, ROOM_ALIAS) join_room(token, room_id) diff --git a/services/comms/atlasbot-deployment.yaml b/services/comms/atlasbot-deployment.yaml index f9b6b61..b2edb76 100644 --- a/services/comms/atlasbot-deployment.yaml +++ b/services/comms/atlasbot-deployment.yaml @@ -16,7 +16,7 @@ spec: labels: app: atlasbot annotations: - checksum/atlasbot-configmap: 80fa4d62ccafbfbcdeb63f0976cbea36aada12649f15f8570932296db5d48949 + checksum/atlasbot-configmap: manual-atlasbot-2 spec: serviceAccountName: atlasbot nodeSelector: