forked from 0x2620/pandora
ignore robots
This commit is contained in:
parent
44e3a89faf
commit
4ca53d8c3b
2 changed files with 6 additions and 5 deletions
|
@ -81,18 +81,18 @@ class Statistics(dict):
|
|||
|
||||
if not year in self[mode]['year']:
|
||||
self[mode]['year'][year] = {}
|
||||
self._increment(self[mode]['year'][year], month, 1)
|
||||
self._increment(self[mode]['year'][year], month)
|
||||
|
||||
self._increment(self[mode]['month'], month, 1)
|
||||
self._increment(self[mode]['month'], month)
|
||||
|
||||
if key == 'firstseen':
|
||||
if not day in self[mode]['day']:
|
||||
self[mode]['day'][day] = {}
|
||||
self._increment(self[mode]['day'][day], hour, 1)
|
||||
self._increment(self[mode]['day'][day], hour)
|
||||
|
||||
if not weekday in self[mode]['weekday']:
|
||||
self[mode]['weekday'][weekday] = {}
|
||||
self._increment(self[mode]['weekday'][weekday], hour, 1)
|
||||
self._increment(self[mode]['weekday'][weekday], hour)
|
||||
|
||||
self._increment(self[mode]['hour'], hour)
|
||||
|
||||
|
|
|
@ -19,7 +19,8 @@ def update_statistics():
|
|||
return izip_longest(*[iter(iterable)]*chunksize, fillvalue=filler)
|
||||
|
||||
stats = Statistics()
|
||||
ids = [i['session_key'] for i in models.SessionData.objects.all().values('session_key')]
|
||||
ids = [i['session_key']
|
||||
for i in models.SessionData.objects.filter(level__gte=0).values('session_key')]
|
||||
|
||||
for chunk in chunker(ids, 100, None):
|
||||
chunk = filter(None, chunk)
|
||||
|
|
Loading…
Reference in a new issue