Skip to content

Commit 1fa9fb7

Browse files
bwbroersmamxsasha
authored andcommitted
Hall of Fame update: use .iterator()
Plus fetch the used id, domain, timestamp and score. Signed-off-by: Benjamin W. Broersma <bw@broersma.com>
1 parent c6498c8 commit 1fa9fb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

checks/tasks/update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def _populate_HOF(hof, model, entry_creation):
7676
previousscore = 0
7777
previoustimestamp = None
7878
previousreportid = None
79-
for report in model.objects.all().order_by("domain", "timestamp"):
79+
for report in model.objects.only("id", "domain", "timestamp", "score").order_by("domain", "timestamp").iterator():
8080
if previousname != report.domain and previousname is not None:
8181
if previousscore >= 100:
8282
entry_creation(hof, previousname, previousreportid, previoustimestamp)

0 commit comments

Comments
 (0)