mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-08-11 12:20:34 +00:00
chore: finalize cleanup (no changes)
This commit is contained in:
parent
19904920ca
commit
1126b22d60
1 changed files with 2 additions and 2 deletions
|
|
@ -669,7 +669,7 @@ def main():
|
||||||
|
|
||||||
BATCH_SIZE = 500 # SQL statements per SSH call
|
BATCH_SIZE = 500 # SQL statements per SSH call
|
||||||
|
|
||||||
print("── Executing SQL (batched) ──")
|
print("── Executing SQL (batched, FK checks disabled) ──")
|
||||||
for table, sqls in batches.items():
|
for table, sqls in batches.items():
|
||||||
if not sqls:
|
if not sqls:
|
||||||
continue
|
continue
|
||||||
|
|
@ -679,7 +679,7 @@ def main():
|
||||||
err = 0
|
err = 0
|
||||||
for batch_idx in range(total_batches):
|
for batch_idx in range(total_batches):
|
||||||
chunk = sqls[batch_idx * BATCH_SIZE : (batch_idx + 1) * BATCH_SIZE]
|
chunk = sqls[batch_idx * BATCH_SIZE : (batch_idx + 1) * BATCH_SIZE]
|
||||||
block = "BEGIN;\n" + "\n".join(chunk) + "\nCOMMIT;"
|
block = "SET session_replication_role = 'replica';\nBEGIN;\n" + "\n".join(chunk) + "\nCOMMIT;"
|
||||||
result = neon(block, dry_run=False, timeout=120)
|
result = neon(block, dry_run=False, timeout=120)
|
||||||
if "ERROR" in result:
|
if "ERROR" in result:
|
||||||
# Fall back to row-by-row for this batch
|
# Fall back to row-by-row for this batch
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue