🔊 — Improve check agent log

This commit is contained in:
Luc Didry 2025-03-18 16:47:23 +01:00
parent 33fd5441e1
commit dbe05178b8
No known key found for this signature in database
GPG key ID: EA868E12D0257E3C
2 changed files with 6 additions and 1 deletions

View file

@ -4,6 +4,7 @@
- 🚸 — Use ReconnectLDAPObject
- ⏰ — Set recurring task to every minute
- 🔊 — Improve check agent log
## 0.9.0

View file

@ -139,7 +139,11 @@ async def recurring_tasks() -> None:
agents = await queries.get_recent_agents_count(db, config.time_without_agent)
if agents == 0:
no_agent_alert(app.state.config)
logger.info("Agent presence checked")
logger.info(
"Agent presence checked (%i agent(s) in the last %i minute(s))",
agents,
config.time_without_agent,
)
removed = await queries.remove_old_results(db, config.max_results_age)
logger.info("%i result(s) removed", removed)