David hace 9 años
padre
commit
dd91c568c5
Se han modificado 1 ficheros con 5 adiciones y 5 borrados
  1. 5 5
      parser.py

+ 5 - 5
parser.py

@@ -11,7 +11,7 @@ from time import strftime,time
 
 from multiprocessing import Pool
 import sys
-from analytics import post
+from analytics import post_data
 
 
 def parseSource(s):
@@ -108,7 +108,7 @@ def news_worker(source, kw, d, q):
 
 # TODO influx start
 
-post('start', {}, 1)
+post_data('start', {}, 1)
 start = time()
 sources = db().sources()
 db().purge_error()
@@ -117,8 +117,8 @@ ret = pool.map(parseSource, sources)
 new = sum([r[3] for r in ret])
 tot = sum([r[1] for r in ret])
 
-post('new', {}, new)
-post('total', {}, tot)
+post_data('new', {}, new)
+post_data('total', {}, tot)
 # TODO influx source new
 # TODO influx source total
 # n = sum(ret)
@@ -129,4 +129,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('start', {}, 0)
+post_data('start', {}, 0)