comms: fix MAS job indentation

This commit is contained in:
Brad Stein 2026-01-28 13:25:51 -03:00
parent 88a4e93194
commit cead8d3561

View File

@ -225,21 +225,21 @@ spec:
login_name = username login_name = username
if not login_name.startswith("@"): if not login_name.startswith("@"):
login_name = f"@{login_name}:{SERVER_NAME}" login_name = f"@{login_name}:{SERVER_NAME}"
r = request_with_retry( r = request_with_retry(
"POST", "POST",
f"{AUTH_BASE}/_matrix/client/v3/login", f"{AUTH_BASE}/_matrix/client/v3/login",
json={ json={
"type": "m.login.password", "type": "m.login.password",
"identifier": {"type": "m.id.user", "user": login_name}, "identifier": {"type": "m.id.user", "user": login_name},
"password": password, "password": password,
}, },
timeout=30, timeout=30,
) )
if r.status_code == 429: if r.status_code == 429:
return False return False
if r.status_code != 200: if r.status_code != 200:
raise RuntimeError(f"login failed for {username}: {r.status_code} {r.text}") raise RuntimeError(f"login failed for {username}: {r.status_code} {r.text}")
return True return True
wait_for_service(MAS_ADMIN_API_BASE) wait_for_service(MAS_ADMIN_API_BASE)
token = admin_token() token = admin_token()
@ -248,10 +248,10 @@ spec:
bot_quick_pass = os.environ.get("BOT_PASS_QUICK", "") bot_quick_pass = os.environ.get("BOT_PASS_QUICK", "")
bot_smart_pass = os.environ.get("BOT_PASS_SMART", "") bot_smart_pass = os.environ.get("BOT_PASS_SMART", "")
ensure_user(token, os.environ["SEEDER_USER"], os.environ["SEEDER_PASS"]) ensure_user(token, os.environ["SEEDER_USER"], os.environ["SEEDER_PASS"])
ensure_user(token, os.environ["BOT_USER"], os.environ["BOT_PASS"]) ensure_user(token, os.environ["BOT_USER"], os.environ["BOT_PASS"])
if bot_quick and bot_quick_pass: if bot_quick and bot_quick_pass:
ensure_user(token, bot_quick, bot_quick_pass) ensure_user(token, bot_quick, bot_quick_pass)
if bot_smart and bot_smart_pass: if bot_smart and bot_smart_pass:
ensure_user(token, bot_smart, bot_smart_pass) ensure_user(token, bot_smart, bot_smart_pass)
PY PY