-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[influxdb] Implement ModifiablePersistenceService #14959
Conversation
This will replace #12935. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! A few minor comments from my side. @florian-h05 - do you want to have a look also? I don't use InfluxDB myself. @J-N-K - since you are testing this already, would it be possible to verify #14806 also so we could get that merged?
...ence.influxdb/src/main/java/org/openhab/persistence/influxdb/InfluxDBPersistenceService.java
Outdated
Show resolved
Hide resolved
...nce.influxdb/src/main/java/org/openhab/persistence/influxdb/internal/InfluxDBRepository.java
Outdated
Show resolved
Hide resolved
OffsetDateTime start = Objects.requireNonNullElse(filter.getBeginDate(), ZonedDateTime.now().minusYears(100)) | ||
.toOffsetDateTime(); | ||
OffsetDateTime stop = Objects.requireNonNullElse(filter.getEndDate(), ZonedDateTime.now().plusYears(100)) | ||
.toOffsetDateTime(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a particular reason for using now +/- 100 years rather than OffsetDateTime.MIN
/OffsetDateTime.MAX
, for example? I should add that I don't know the internals of InfluxDB and the used API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a very good question. I just kept it the same way it is done for missing start/end dates in other queries.
Signed-off-by: Jan N. Klug <[email protected]>
Signed-off-by: Jan N. Klug <[email protected]>
@jlaur I think I addressed all your comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* [influxdb] Implement ModifiablePersistenceService Signed-off-by: Jan N. Klug <[email protected]> Signed-off-by: Thomas Burri <[email protected]>
* [influxdb] Implement ModifiablePersistenceService Signed-off-by: Jan N. Klug <[email protected]> Signed-off-by: Matt Myers <[email protected]>
* [influxdb] Implement ModifiablePersistenceService Signed-off-by: Jan N. Klug <[email protected]> Signed-off-by: Jørgen Austvik <[email protected]>
See title. This will be needed to store forecasts or retrospectivly added data.