Skip to content

Commit bcf7834

Browse files
authored
Merge pull request #27 from dev-dull/22-inf-loop
22 inf loop
2 parents bd7c0cd + c8b9636 commit bcf7834

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ddb.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@ def referrer_counts(self):
215215
def _get_counts(self, property):
216216
stats = defaultdict(lambda: defaultdict(lambda: defaultdict(int)))
217217
for id, ddb in self.items():
218-
for referrer, count in getattr(ddb, property).items():
218+
for remote_ip, count in getattr(ddb, property).items():
219219
for value, _count in count.items():
220-
stats[id][referrer][value] += _count
220+
stats[id][remote_ip][value] += _count
221221
return stats
222222

223223

@@ -231,6 +231,7 @@ def __add__(self, user_data):
231231
now = time()
232232
while now in self:
233233
sleep(0.1)
234+
now = time()
234235
self[now] = user_data
235236
self._cleanup()
236237
return self

0 commit comments

Comments
 (0)