maybe-fix-outofmemory
This commit is contained in:
parent
00eb239fff
commit
725d29ae8e
|
@ -5,7 +5,7 @@ import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
from datetime import datetime, timezone
|
from datetime import datetime, timezone
|
||||||
|
import gc
|
||||||
import bs4
|
import bs4
|
||||||
from migration.tables.comments import migrate as migrateComment
|
from migration.tables.comments import migrate as migrateComment
|
||||||
from migration.tables.comments import migrate_2stage as migrateComment_2stage
|
from migration.tables.comments import migrate_2stage as migrateComment_2stage
|
||||||
|
@ -88,6 +88,7 @@ async def shouts_handle(storage, args):
|
||||||
topics_dataset_bodies = []
|
topics_dataset_bodies = []
|
||||||
topics_dataset_tlist = []
|
topics_dataset_tlist = []
|
||||||
for entry in storage["shouts"]["data"]:
|
for entry in storage["shouts"]["data"]:
|
||||||
|
gc.collect()
|
||||||
# slug
|
# slug
|
||||||
slug = get_shout_slug(entry)
|
slug = get_shout_slug(entry)
|
||||||
|
|
||||||
|
@ -319,7 +320,9 @@ async def handle_auto():
|
||||||
mongo_download(url)
|
mongo_download(url)
|
||||||
bson_handle()
|
bson_handle()
|
||||||
await all_handle(data_load(), sys.argv)
|
await all_handle(data_load(), sys.argv)
|
||||||
create_pgdump()
|
if "dump" in sys.argv:
|
||||||
|
print("[migration] creating pgdump")
|
||||||
|
create_pgdump()
|
||||||
|
|
||||||
|
|
||||||
async def handle_comments():
|
async def handle_comments():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user