iwla

iwla Commit Details

Date:2015-01-11 18:05:09 (6 years 6 months ago)
Author:Grégory Soutadé
Branch:dev, master
Commit:588b3179d572b6a76fd7f4a5b121b9a9d6bc814a
Parents: a67ed82c7497807b81068ca5a28a1cc3119d9492
Message:Generate display before serialization (avoid errors when generation raise exception and database partially saved (months but not meta))

Changes:
Miwla.py (3 diffs)

File differences

iwla.py
578578
579579
580580
581
582
581583
582584
583585
......
590592
591593
592594
593
595
596
594597
595598
596599
......
700703
701704
702705
703
704706
705707
706708
if os.path.exists(path):
os.remove(path)
self._generateDisplay()
self.logger.info("==> Serialize to %s" % (path))
self._serialize(self.current_analysis, path)
self.meta_infos['stats'][year] = {}
self.meta_infos['stats'][year][month] = duplicated_stats
self._generateDisplay()
self.logger.info("==> Serialize to %s" % (conf.META_PATH))
self._serialize(self.meta_infos, conf.META_PATH)
def _generateDayStats(self):
visits = self.current_analysis['visits']
self._generateDayStats()
self._generateMonthStats()
del self.meta_infos['start_analysis_time']
self._serialize(self.meta_infos, conf.META_PATH)
else:
self.logger.info('==> Analyse not started : nothing new')

Archive Download the corresponding diff file

Branches

Tags