Add isMultimediaFile() and generate after serialization
This commit is contained in:
parent
4c74a14037
commit
75b11c2e97
13
iwla.py
13
iwla.py
|
@ -275,6 +275,15 @@ class IWLA(object):
|
|||
self.logger.debug("False")
|
||||
return False
|
||||
|
||||
def isMultimediaFile(self, request):
|
||||
self.logger.debug("Is multimedia %s" % (request))
|
||||
for e in conf.multimedia_files:
|
||||
if request.endswith(e):
|
||||
self.logger.debug("True")
|
||||
return True
|
||||
self.logger.debug("False")
|
||||
return False
|
||||
|
||||
def _appendHit(self, hit):
|
||||
remote_addr = hit['remote_addr']
|
||||
|
||||
|
@ -578,8 +587,6 @@ class IWLA(object):
|
|||
if os.path.exists(path):
|
||||
os.remove(path)
|
||||
|
||||
self._generateDisplay()
|
||||
|
||||
self.logger.info("==> Serialize to %s" % (path))
|
||||
self._serialize(self.current_analysis, path)
|
||||
|
||||
|
@ -595,6 +602,8 @@ class IWLA(object):
|
|||
self.logger.info("==> Serialize to %s" % (conf.META_PATH))
|
||||
self._serialize(self.meta_infos, conf.META_PATH)
|
||||
|
||||
self._generateDisplay()
|
||||
|
||||
def _generateDayStats(self):
|
||||
visits = self.current_analysis['visits']
|
||||
cur_time = self.meta_infos['last_time']
|
||||
|
|
Loading…
Reference in New Issue
Block a user