Browse Source

more analytics

David 9 years ago
parent
commit
3b90f1f441
1 changed files with 4 additions and 0 deletions
  1. 4 0
      parser.py

+ 4 - 0
parser.py

@@ -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"')