New format for (not_)viewed pages/hits and bandwidth that are now recorded by day (in a dictionnary were only element 0 is initialized). Element 0 is the total. WARNING : not backward compatible with previous databases.

This commit is contained in:
Gregory Soutade
2017-08-24 07:55:53 +02:00
parent fffab335fa
commit 007be71ad6
8 changed files with 61 additions and 59 deletions

View File

@@ -104,12 +104,12 @@ class IWLAPreAnalysisRobots(IPlugin):
continue
# 1) no pages view --> robot
# if not super_hit['viewed_pages']:
# if not super_hit['viewed_pages'][0]:
# super_hit['robot'] = 1
# continue
# 2) pages without hit --> robot
if not super_hit['viewed_hits']:
if not super_hit['viewed_hits'][0] and super_hit['viewed_pages'][0]:
self.logger.debug(super_hit)
self._setRobot(k, super_hit)
continue
@@ -137,7 +137,7 @@ class IWLAPreAnalysisRobots(IPlugin):
self._setRobot(k, super_hit)
continue
if not super_hit['viewed_pages'] and \
(super_hit['viewed_hits'] and not referers):
if not super_hit['viewed_pages'][0] and \
(super_hit['viewed_hits'][0] and not referers):
self._setRobot(k, super_hit)
continue