Bug : hits/pages in the same second where not analyzed
This commit is contained in:
parent
a6ce8e1c6e
commit
bfba52af8f
9
iwla.py
9
iwla.py
|
@ -267,10 +267,12 @@ class IWLA(object):
|
||||||
mod.hook(*args)
|
mod.hook(*args)
|
||||||
|
|
||||||
def isPage(self, request):
|
def isPage(self, request):
|
||||||
|
self.logger.debug("Is page %s" % (request))
|
||||||
for e in conf.pages_extensions:
|
for e in conf.pages_extensions:
|
||||||
if request.endswith(e):
|
if request.endswith(e):
|
||||||
|
self.logger.debug("True")
|
||||||
return True
|
return True
|
||||||
|
self.logger.debug("False")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _appendHit(self, hit):
|
def _appendHit(self, hit):
|
||||||
|
@ -627,6 +629,7 @@ class IWLA(object):
|
||||||
|
|
||||||
def _newHit(self, hit):
|
def _newHit(self, hit):
|
||||||
if not self.domain_name_re.match(hit['server_name']):
|
if not self.domain_name_re.match(hit['server_name']):
|
||||||
|
self.logger.debug("Not in domain %s" % (hit))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
t = self._decodeTime(hit)
|
t = self._decodeTime(hit)
|
||||||
|
@ -637,7 +640,9 @@ class IWLA(object):
|
||||||
self.current_analysis = self._deserialize(self.getDBFilename(t)) or self._clearVisits()
|
self.current_analysis = self._deserialize(self.getDBFilename(t)) or self._clearVisits()
|
||||||
self.analyse_started = True
|
self.analyse_started = True
|
||||||
else:
|
else:
|
||||||
if time.mktime(t) <= time.mktime(cur_time):
|
if not self.analyse_started and\
|
||||||
|
time.mktime(t) <= time.mktime(cur_time):
|
||||||
|
self.logger.debug("Not in time")
|
||||||
return False
|
return False
|
||||||
self.analyse_started = True
|
self.analyse_started = True
|
||||||
if cur_time.tm_mon != t.tm_mon:
|
if cur_time.tm_mon != t.tm_mon:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user