|
|
@@ -108,12 +108,11 @@ def news_worker(source, kw, d, q):
|
|
|
|
|
|
# TODO influx start
|
|
|
|
|
|
-post_data('event', 'start')
|
|
|
+post_data('event', {}, 'start')
|
|
|
start = time()
|
|
|
sources = db().sources()
|
|
|
-post_data('event', 'purge_error_start')
|
|
|
db().purge_error()
|
|
|
-post_data('event', 'purge_error_finish')
|
|
|
+post_data('event', {}, 'purge_error_finish')
|
|
|
pool = Pool(processes=4)
|
|
|
ret = pool.map(parseSource, sources)
|
|
|
new = sum([r[3] for r in ret])
|
|
|
@@ -131,4 +130,4 @@ print("[%s] %d/%d new articles, total time %d sec" %
|
|
|
(strftime("%H:%M:%S"), new, tot, time()-start))
|
|
|
print("#" * 75)
|
|
|
# TODO influx end
|
|
|
-post_data('event', 'end')
|
|
|
+post_data('event', {}, 'end')
|