Commit e424ea8e by Julien Danjou Committed by pastamaker[bot]

metricd: use process_new_measures_for_sack in test code

parent 72a7a39b
......@@ -297,14 +297,15 @@ def metricd_tester(conf):
index = indexer.get_driver(conf)
s = storage.get_driver(conf)
inc = incoming.get_driver(conf)
metrics = set()
c = chef.Chef(None, inc, index, s)
metrics_count = 0
for sack in inc.iter_sacks():
metrics.update(inc.list_metric_with_measures_to_process(sack))
if len(metrics) >= conf.stop_after_processing_metrics:
try:
metrics_count += c.process_new_measures_for_sack(s, True)
except chef.SackAlreadyLocked:
continue
if metrics_count >= conf.stop_after_processing_metrics:
break
c = chef.Chef(None, inc, index, s)
c.process_new_measures(
list(metrics)[:conf.stop_after_processing_metrics], True)
def metricd():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment