moved "not ready" due to missing aggregation_max into Aggregator

This commit is contained in:
2024-08-30 14:53:05 +02:00
parent 7d57d6c5e0
commit 4db7f4f8cd
2 changed files with 3 additions and 4 deletions

View File

@ -63,10 +63,7 @@ def calc_aggregation_ready(results, aggregator):
if not apply_aggregation:
return False
if "aggregation_max" not in results:
return False
aggregation_max = results["aggregation_max"]
aggregation_max = results.get("aggregation_max")
if not aggregator.is_ready(aggregation_max):
return False

View File

@ -20,6 +20,8 @@ class Aggregator:
__iadd__ = add
def is_ready(self, nmax):
if nmax is None:
return False
return (self.counter >= nmax)
def __repr__(self):