various improvements

This commit is contained in:
uwsgi
2017-02-21 18:05:51 +01:00
parent 158ab4236f
commit ae2f61485e
8 changed files with 40 additions and 14 deletions

View File

@@ -3,7 +3,7 @@ from mqueues import fetch_queue, compile_queue, process_queue
from compiler import do_compile
from mprocess import do_process
from fetching import fetch_page
from gevent import spawn
from gevent import spawn,sleep
from itertools import repeat
from models import CrawlUrl
from src import clogger
@@ -22,6 +22,7 @@ def start_workers(f,c,p):
def work_fetch():
try:
while True:
sleep(2)
run_fetch()
except Empty:
clogger.info("Fetch - Worker died")