moved "not ready" due to missing aggregation_max into Aggregator
This commit is contained in:
@ -63,10 +63,7 @@ def calc_aggregation_ready(results, aggregator):
|
|||||||
if not apply_aggregation:
|
if not apply_aggregation:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if "aggregation_max" not in results:
|
aggregation_max = results.get("aggregation_max")
|
||||||
return False
|
|
||||||
|
|
||||||
aggregation_max = results["aggregation_max"]
|
|
||||||
|
|
||||||
if not aggregator.is_ready(aggregation_max):
|
if not aggregator.is_ready(aggregation_max):
|
||||||
return False
|
return False
|
||||||
|
@ -20,6 +20,8 @@ class Aggregator:
|
|||||||
__iadd__ = add
|
__iadd__ = add
|
||||||
|
|
||||||
def is_ready(self, nmax):
|
def is_ready(self, nmax):
|
||||||
|
if nmax is None:
|
||||||
|
return False
|
||||||
return (self.counter >= nmax)
|
return (self.counter >= nmax)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
|
Reference in New Issue
Block a user