浏览代码

Take out the trash

pull/4/head
tech234a 3 年前
父节点
当前提交
cf7bfa726c
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. +3
    -0
      export.py
  2. +4
    -0
      worker.py

+ 3
- 0
export.py 查看文件

@@ -29,6 +29,8 @@ from datetime import timedelta

from json import dumps

from gc import collect

import requests

# https://docs.python.org/3/library/html.parser.html
@@ -71,6 +73,7 @@ class MyHTMLParser(HTMLParser):

def subprrun(jobs, headers):
while not jobs.empty():
collect() #cleanup memory
langcode, vid = jobs.get()
vid = vid.strip()
print(langcode, vid)


+ 4
- 0
worker.py 查看文件

@@ -9,6 +9,8 @@ from shutil import make_archive, rmtree

from queue import Queue

from gc import collect

from discovery import getmetadata
from export import subprrun

@@ -99,6 +101,8 @@ while True:
sleep(600)

while True:
collect() #cleanup

try:
mkdir("out")
except:


正在加载...
取消
保存