metrics: ingest_dashboard_config: initialize seen with last record keys.
This commit is contained in:
parent
e3b66f63b2
commit
4a1eb1701b
@ -411,6 +411,13 @@ def dashboard_at_changed(api, filename, revision=None):
|
|||||||
|
|
||||||
def ingest_dashboard_config(content):
|
def ingest_dashboard_config(content):
|
||||||
if not hasattr(ingest_dashboard_config, 'seen'):
|
if not hasattr(ingest_dashboard_config, 'seen'):
|
||||||
|
result = client.query('SELECT * FROM dashboard_config ORDER BY time DESC LIMIT 1')
|
||||||
|
if result:
|
||||||
|
# Extract last point and remove zero values since no need to fill.
|
||||||
|
point = next(result.get_points())
|
||||||
|
point = {k: v for (k, v) in point.iteritems() if k != 'time' and v != 0}
|
||||||
|
ingest_dashboard_config.seen = set(point.keys())
|
||||||
|
else:
|
||||||
ingest_dashboard_config.seen = set()
|
ingest_dashboard_config.seen = set()
|
||||||
|
|
||||||
fields = {}
|
fields = {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user