Skip to content

Commit 1b88ab2

Browse files
committed
minor bug fix
1 parent 8ff1d08 commit 1b88ab2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

snafu/run_snafu.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,9 @@ def process_generator(index_args, parser):
261261
}
262262
"""
263263

264-
index_prom_data(index_args, action, sample)
264+
index_prom_data(index_args, action, nsample)
265265
else:
266-
es_valid_document = get_valid_es_document(action, index, index_args, sample)
266+
es_valid_document = get_valid_es_document(action, index, index_args, nsample)
267267
yield es_valid_document
268268

269269

@@ -296,7 +296,7 @@ def index_prom_data(index_args, action, nsample):
296296
es_settings = {}
297297

298298
# definition of prometheus data getter, will yield back prom doc
299-
def get_prometheus_generator(index_args, action):
299+
def get_prometheus_generator(index_args, action, nsample):
300300
prometheus_doc_generator = get_prometheus_data(action)
301301
for prometheus_doc in prometheus_doc_generator.get_all_metrics():
302302
es_valid_document = get_valid_es_document(prometheus_doc, "prometheus_data", index_args, nsample)
@@ -334,7 +334,7 @@ def get_prometheus_generator(index_args, action):
334334
logger.info("initializing prometheus indexing")
335335
parallel_setting = strtobool(os.environ.get("parallel", "false"))
336336
res_beg, res_end, res_suc, res_dup, res_fail, res_retry = streaming_bulk(
337-
es, get_prometheus_generator(index_args, action), parallel_setting
337+
es, get_prometheus_generator(index_args, action, nsample), parallel_setting
338338
)
339339

340340
logger.info(

0 commit comments

Comments
 (0)