moved "not ready" due to missing aggregation_max into Aggregator
This commit is contained in:
1 parent
7d57d6c5e0
commit
4db7f4f8cd
2 files changed
+3
-4
No files matched your search
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user