Indexer: docker exec never reads the caller's stdin (it swallowed a remote script's remaining lines)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-09 15:43:22 -06:00
parent 5b0ef24378
commit 31709ff051
+1 -1
View File
@@ -62,7 +62,7 @@ def iap_wallet_users():
"const [a]=await c.query(\"SELECT LOWER(address) a, username u FROM accounts WHERE address IS NOT NULL AND address<>'' AND username IS NOT NULL AND username<>''\");"
"const [p]=await c.query(\"SELECT LOWER(p.address) a, x.username u FROM positions p JOIN accounts x ON x.email=p.email WHERE p.address IS NOT NULL AND x.username IS NOT NULL\");"
"const o={};for(const r of a.concat(p))if(r.a&&r.u&&!o[r.a])o[r.a]=String(r.u).toLowerCase();console.log(JSON.stringify(o));await c.end()})().catch(e=>{console.log('{}')})")
r = subprocess.run(['docker', 'exec', '-i', '-w', '/app', name, 'node', '-e', js], capture_output=True, text=True, timeout=60)
r = subprocess.run(['docker', 'exec', '-i', '-w', '/app', name, 'node', '-e', js], capture_output=True, text=True, timeout=60, stdin=subprocess.DEVNULL) # never read the caller's stdin
try:
return json.loads(r.stdout.strip().splitlines()[-1])
except Exception: