]> git.ipfire.org Git - dbl.git/commitdiff
lists: Don't optimize the list if not necessary
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Feb 2026 13:42:51 +0000 (13:42 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Feb 2026 13:42:51 +0000 (13:42 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/dbl/lists.py

index 38a919e30a0194761a0c744b444fff8c7c79bbd1..0186dd185bcf8fc36616de03671cab5b9db5cd3a 100644 (file)
@@ -784,6 +784,11 @@ class List(sqlmodel.SQLModel, database.BackendMixin, table=True):
                """
                        Optimizes this list
                """
+               # Don't optimize if the list has not been changed
+               if self.updated_at <= self.optimized_at:
+                       log.debug("%s does not require optimization..." % self)
+                       return
+
                log.info("Optimizing %s..." % self)
 
                # Fetch all whitelisted domains