Don't account hits <= last_access (< before)
This commit is contained in:
parent
3c5f117870
commit
c221c813bf
8
iwla.py
8
iwla.py
|
@ -551,9 +551,8 @@ class IWLA(object):
|
|||
self.current_analysis = self._deserialize(self.getDBFilename(t)) or self._clearVisits()
|
||||
self.analyse_started = True
|
||||
else:
|
||||
if time.mktime(t) < time.mktime(cur_time):
|
||||
if time.mktime(t) <= time.mktime(cur_time):
|
||||
return False
|
||||
if not self.analyse_started:
|
||||
self.analyse_started = True
|
||||
if cur_time.tm_mon != t.tm_mon:
|
||||
self._generateMonthStats()
|
||||
|
@ -581,6 +580,8 @@ class IWLA(object):
|
|||
|
||||
self.meta_infos = self._deserialize(conf.META_PATH) or self._clearMeta()
|
||||
if self.meta_infos['last_time']:
|
||||
print 'Last time'
|
||||
print self.meta_infos['last_time']
|
||||
self.current_analysis = self._deserialize(self.getDBFilename(self.meta_infos['last_time'])) or self._clearVisits()
|
||||
else:
|
||||
self._clearVisits()
|
||||
|
@ -609,8 +610,7 @@ class IWLA(object):
|
|||
del self.meta_infos['start_analysis_time']
|
||||
self._serialize(self.meta_infos, conf.META_PATH)
|
||||
else:
|
||||
print '==> Analyse not started : nothing to do'
|
||||
self._generateMonthStats()
|
||||
print '==> Analyse not started : nothing new'
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(description='Intelligent Web Log Analyzer')
|
||||
|
|
Loading…
Reference in New Issue
Block a user