From a917ed9eeb69df5b885cfa7635170d730cf3b8d3 Mon Sep 17 00:00:00 2001 From: Jan Dobes Date: Tue, 24 Feb 2026 14:15:16 +0100 Subject: [PATCH] fix(evaluator): send always current timestamp in ISO format to inventory views simplifies logic around last_timestamp null value --- common/utils.py | 4 ++-- evaluator/processor.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/common/utils.py b/common/utils.py index 579fdf5bc..ea2d5436e 100644 --- a/common/utils.py +++ b/common/utils.py @@ -11,6 +11,7 @@ from uuid import uuid4 import asyncpg +import pytz import requests from dateutil.parser import isoparse from prometheus_client import Counter @@ -362,7 +363,6 @@ def send_inventory_views( inventory_id, org_id, rh_account_id, - last_evaluation, total_cves, critical_cves, high_severity_cves, @@ -380,7 +380,7 @@ def send_inventory_views( msg = { "org_id": org_id, - "timestamp": str(last_evaluation), + "timestamp": datetime.now(tz=pytz.utc).isoformat(), "hosts": [ { "id": inventory_id, diff --git a/evaluator/processor.py b/evaluator/processor.py index 146820627..be61e9d67 100644 --- a/evaluator/processor.py +++ b/evaluator/processor.py @@ -375,7 +375,6 @@ async def _evaluate_system( inventory_id, org_id, system_platform.rh_account_id, - system_platform.last_evaluation, total_cves, critical_cves, high_severity_cves,