diff --git a/iwla.py b/iwla.py index 93de2cd..81571be 100755 --- a/iwla.py +++ b/iwla.py @@ -551,10 +551,9 @@ 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 + self.analyse_started = True if cur_time.tm_mon != t.tm_mon: self._generateMonthStats() self.current_analysis = self._deserialize(self.getDBFilename(t)) or self._clearVisits() @@ -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')