Commit 1fd185e4 authored by Waleed Akbar's avatar Waleed Akbar
Browse files

feat: Update timestamp handling in AggregatedLinkSample to use datetime object directly

parent e427d5dd
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ class AggregationCache:
                    ))
                    # Return a copy with updated timestamp
                    return AggregatedLinkSample(
                        timestamp=datetime.now(timezone.utc).isoformat(),
                        timestamp=datetime.now(timezone.utc),
                        bandwidth_utilization=self._last_valid_aggregation.bandwidth_utilization,
                        latency=self._last_valid_aggregation.latency,
                        related_service_ids=self._last_valid_aggregation.related_service_ids.copy()
@@ -83,9 +83,9 @@ class AggregationCache:
                else:
                    MSG = '[aggregate] No samples available and no cached data, returning zeros'
                    LOGGER.warning(MSG)
                    return AggregatedLinkSample(timestamp=datetime.now(timezone.utc).isoformat())
                    return AggregatedLinkSample(timestamp=datetime.now(timezone.utc))
            
            agg = AggregatedLinkSample(timestamp=datetime.now(timezone.utc).isoformat())
            agg = AggregatedLinkSample(timestamp=datetime.now(timezone.utc))
            for link_key, sample in self._samples.items():
                network_id, link_id = link_key