This commit is contained in:
tonyrewin 2022-12-14 09:59:59 +03:00
parent 743ab1e18f
commit 3eba61b36f

View File

@ -15,13 +15,13 @@ def json_tables():
"email_subscriptions": [],
"users": [],
"comments": [],
"remarks": []
}
for table in data.keys():
print('[migration] bson2json for ' + table)
gc.collect()
lc = []
with open("dump/discours/" + table + ".bson", "rb") as f:
bs = f.read()
f.close()
bs = open("dump/discours/" + table + ".bson", "rb").read()
base = 0
while base < len(bs):
base, d = bson.decode_document(bs, base)