Skip to content
Snippets Groups Projects
Verified Commit 2eba4ee9 authored by Yorick Peterse's avatar Yorick Peterse
Browse files

Handle missing continuous queries in rake queries

parent 60b838e1
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -63,7 +63,12 @@ task :queries do
 
puts "Creating continuous query #{name}"
 
CLIENT.query("DROP CONTINUOUS QUERY #{name} ON #{db}")
begin
CLIENT.query("DROP CONTINUOUS QUERY #{name} ON #{db}")
rescue InfluxDB::QueryError => error
raise unless error.message.include?('query not found')
end
CLIENT.query(query)
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment