-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
Since 1f7f18b there is an effective limit of 1_000.
However only completely new entries are shown, and old domains can not longer be 'bumped' to the top of the list like before.
Internet.nl/interface/views/shared.py
Lines 231 to 235 in 8ec6f9d
| def get_hof_cache(cache_id, count): | |
| cached_data = cache.get(cache_id, None) | |
| if cached_data is None: | |
| return "…", 0, [] | |
| return (cached_data["date"], cached_data["count"], cached_data["data"][:count]) |
cached_data["data"][:count] will get the first count items, and Internet.nl/checks/tasks/update.py
Lines 127 to 136 in 8ec6f9d
| if is_web and is_mail: | |
| timestamp = entry.mail_timestamp | |
| permalink = entry.mail_permalink | |
| if entry.web_timestamp > entry.mail_timestamp: | |
| timestamp = entry.web_timestamp | |
| permalink = entry.web_permalink | |
| champions.append({"permalink": permalink, "domain": entry.domain, "timestamp": timestamp}) | |
| champions = sorted(champions, key=lambda x: x["timestamp"], reverse=True) | |
| web = sorted(web, key=lambda x: x["timestamp"], reverse=True) | |
| mail = sorted(mail, key=lambda x: x["timestamp"], reverse=True) |
Internet.nl/checks/tasks/update.py
Line 79 in 8ec6f9d
| for report in model.objects.only("id", "domain", "timestamp", "score").order_by("domain", "timestamp").iterator(): |
To support bumping, remove this if, and always update the timestamp with the latest report:
Internet.nl/checks/tasks/update.py
Lines 90 to 91 in 8ec6f9d
| if report_score != previousscore: | |
| previoustimestamp = report.timestamp |
Related:
Metadata
Metadata
Assignees
Labels
No labels