fix(sync): atomic token push with backup, no truncated pool on ssh drop
This commit is contained in:
+3
-1
@@ -47,7 +47,9 @@ def main():
|
||||
uniq.append(r)
|
||||
payload = "\n".join(json.dumps(r, ensure_ascii=False) for r in uniq) + "\n"
|
||||
rc, out, err = sh(["ssh", "-o", "BatchMode=yes", "-o", "StrictHostKeyChecking=no", PROD,
|
||||
"cat > %s && systemctl restart minara-shim && sleep 2 && curl -s -m 10 http://127.0.0.1:48140/health" % REMOTE],
|
||||
("cp -f %s %s.bak 2>/dev/null; cat > %s.tmp && mv -f %s.tmp %s && "
|
||||
"systemctl restart minara-shim && sleep 2 && "
|
||||
"curl -s -m 10 http://127.0.0.1:48140/health") % (REMOTE, REMOTE, REMOTE, REMOTE, REMOTE)],
|
||||
inp=payload)
|
||||
print("local=%d remote_before=%s rc=%d %s %s" % (len(uniq), remote_n, rc, out[:200], err))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user