Skip to content

Commit

Permalink
Minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan committed Jan 19, 2017
1 parent 2cdcde8 commit c01969c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions influxgraph/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,15 @@ def _retrieve_field_data(infl_data, measurement_data, measurement,
_retrieve_named_field_data(infl_data, measurement_data,
measurement, tags, _data)

def read_measurement_metric_values(infl_data, measurement, paths, _data):
def _read_measurement_metric_values(infl_data, measurement, paths, _data):
if not measurement in paths:
return
_data[measurement] = [d['value']
for d in infl_data.get_points(
measurement=measurement)]

def read_influxdb_values(influxdb_data, paths, measurement_data):
"""Return key -> values dict for values from InfluxDB data"""
"""Return metric path -> datapoints dict for values from InfluxDB data"""
_data = {}
if not isinstance(influxdb_data, list):
influxdb_data = [influxdb_data]
Expand All @@ -211,8 +211,8 @@ def read_influxdb_values(influxdb_data, paths, measurement_data):
measurement = infl_keys[0]
tags = infl_keys[1]
if not measurement_data:
read_measurement_metric_values(infl_data, measurement,
paths, _data)
_read_measurement_metric_values(infl_data, measurement,
paths, _data)
continue
elif not measurement in measurement_data:
continue
Expand Down

0 comments on commit c01969c

Please sign in to comment.