Add start_time filter in ts_utils.listSeries

This commit is contained in:
emanuele-f 2018-06-27 16:47:33 +02:00
parent bd8ca9b6e7
commit 39a7375727
3 changed files with 52 additions and 33 deletions

View file

@ -198,15 +198,24 @@ end
-----------------------------------------------------------------------
-- List all the data series matching the given filter.
-- Only data series updated after start_time will be returned.
-- Returns a list of expanded tags based on the matches.
function ts_utils.listSeries(schema, tags_filter)
function ts_utils.listSeries(schema, tags_filter, start_time)
local driver = ts_utils.getQueryDriver()
if not driver then
return nil
end
return driver:listSeries(schema, tags_filter)
local wildcard_tags = {}
for tag in pairs(schema.tags) do
if not tags_filter[tag] then
wildcard_tags[#wildcard_tags + 1] = tag
end
end
return driver:listSeries(schema, tags_filter, wildcard_tags, start_time)
end
-----------------------------------------------------------------------