feat: Enhance logging configuration to support dynamic log levels

This commit is contained in:
Lorenzo Venerandi
2026-03-01 17:36:29 +01:00
parent 43d3b96364
commit fbc757f0a6
4 changed files with 43 additions and 7 deletions

View File

@@ -848,6 +848,33 @@ class DatabaseManager:
session.rollback()
raise
def flag_all_ips_for_reevaluation(self) -> int:
"""
Flag ALL IPs for reevaluation, regardless of staleness.
Skips IPs that have a manual category set.
Returns:
Number of IPs flagged for reevaluation
"""
session = self.session
try:
count = (
session.query(IpStats)
.filter(
IpStats.need_reevaluation == False,
IpStats.manual_category == False,
)
.update(
{IpStats.need_reevaluation: True},
synchronize_session=False,
)
)
session.commit()
return count
except Exception as e:
session.rollback()
raise
def get_access_logs_paginated(
self,
page: int = 1,