Commit 93a8c67a authored by neop's avatar neop
Browse files

not sure what to put for bucket

parent 863a3d59
......@@ -96,17 +96,14 @@ public class Main {
}
private static void run() throws Exception {
var queryApi = influxDBClient.getQueryApi();
var tables = queryApi.query("from(bucket:\"sensor\") |> range(start: -1d) |> mean() |> yield(name: \"_results\")");
var tables = influxDBClient.getQueryApi().query("from(bucket:\"openforecast\") |> range(start: -1d) |> mean() |> yield(name: \"_results\")");
for (var fluxTable : tables) {
var records = fluxTable.getRecords();
for (var fluxRecord : records) {
System.out.println(fluxRecord.getTime() + ": " + fluxRecord.getValueByKey("_value"));
}
}
for (var fluxTable : tables) {
var records = fluxTable.getRecords();
for (var fluxRecord : records) {
System.out.println(fluxRecord.getTime() + ": " + fluxRecord.getValueByKey("_value"));
}
}
// try_uploading_failed_sensors();
// upload_all_days();
......@@ -208,6 +205,7 @@ public class Main {
Main.logger.log(Level.SEVERE, "An unrecoverable exception occured, terminating...", e);
} finally {
driver.close();
influxDBClient.close();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment