Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
j.hoerdt
sensor2graph
Commits
cc3bfb7d
Commit
cc3bfb7d
authored
Nov 22, 2021
by
neop
Browse files
again
parent
17f5bb7e
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/sensor2graph/Main.java
View file @
cc3bfb7d
...
...
@@ -96,14 +96,16 @@ public class Main {
}
private
static
void
run
()
throws
Exception
{
var
tables
=
influxDBClient
.
getQueryApi
().
query
(
"from(bucket:\"openforecast\") |> range(start: -600d) |> mean() |> yield(name: \"_results\")"
);
var
tables
=
influxDBClient
.
getQueryApi
().
query
(
"from(bucket:\"openforecast\") |> range(start: -600d
, stop: -599d
) |> mean() |> yield(name: \"_results\")"
);
System
.
out
.
println
(
"starting influx query"
);
for
(
var
fluxTable
:
tables
)
{
var
records
=
fluxTable
.
getRecords
();
for
(
var
fluxRecord
:
records
)
{
System
.
out
.
println
(
fluxRecord
.
getTime
()
+
": "
+
fluxRecord
.
getValueByKey
(
"_value"
));
}
}
System
.
out
.
println
(
"finished influx query"
);
// try_uploading_failed_sensors();
// upload_all_days();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment