|
|
@@ -106,8 +106,11 @@ def news_worker(source, kw, d, q):
|
|
|
|
|
|
post_data('event', {}, '"start"')
|
|
|
start = time()
|
|
|
+print("init db")
|
|
|
d = db()
|
|
|
+print("init sources")
|
|
|
sources = d.sources()
|
|
|
+print("cnt error")
|
|
|
post_data('value', {'type': 'error'}, d.count_error())
|
|
|
post_data('event', {}, '"purge_error_finish"')
|
|
|
d.purge_error()
|
|
|
@@ -128,4 +131,5 @@ print("[%s] %d/%d new articles, total time %d sec" %
|
|
|
(strftime("%H:%M:%S"), new, tot, time()-start))
|
|
|
post_data('time', {'type': 'total'}, time()-start)
|
|
|
print("#" * 75)
|
|
|
+post_data('value', {'type': 'error'}, d.count_error())
|
|
|
post_data('event', {}, '"end"')
|