more-ram-fixs
This commit is contained in:
@@ -336,7 +336,7 @@ async def main():
|
|||||||
init_tables()
|
init_tables()
|
||||||
if len(sys.argv) == 2:
|
if len(sys.argv) == 2:
|
||||||
await handle_auto()
|
await handle_auto()
|
||||||
elif "comments" in sys.srgv:
|
elif "comments" in sys.argv:
|
||||||
await handle_comments()
|
await handle_comments()
|
||||||
else:
|
else:
|
||||||
print("[migration] usage: python server.py migrate")
|
print("[migration] usage: python server.py migrate")
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import json
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
import bson
|
import bson
|
||||||
|
import gc
|
||||||
from .utils import DateTimeEncoder
|
from .utils import DateTimeEncoder
|
||||||
|
|
||||||
|
|
||||||
@@ -17,6 +17,7 @@ def json_tables():
|
|||||||
"comments": [],
|
"comments": [],
|
||||||
}
|
}
|
||||||
for table in data.keys():
|
for table in data.keys():
|
||||||
|
gc.collect()
|
||||||
lc = []
|
lc = []
|
||||||
with open("dump/discours/" + table + ".bson", "rb") as f:
|
with open("dump/discours/" + table + ".bson", "rb") as f:
|
||||||
bs = f.read()
|
bs = f.read()
|
||||||
|
|||||||
Reference in New Issue
Block a user