Skip to content
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

Add support for snapshot readertype #18

Merged
merged 10 commits into from
Aug 12, 2020
Merged

Add support for snapshot readertype #18

merged 10 commits into from
Aug 12, 2020

Conversation

einarsi
Copy link
Collaborator

@einarsi einarsi commented Aug 12, 2020

Support for calling read() with ReaderType.SNAPSHOT added to all handlers.

Renamed stop_time to end_time.
The read() input arguments start_time, stop_time and ts are now keyword arguments. ts is default 60 (seconds).
For Web based handlers, end_time is an optional argument to snapshot reads. Will fetch a snapshot from the time provided.

Rename stop_time to end_time
Make ts=60 default arg value for read()
Make end_time parameter when querying for snapshot.
Slightly better handling of maps implemented.
Now passes entire fetched mapdef dict to generate_read_query()
instead of simply MAP_HistoryValue. This provides MAP_CurrentTimeStamp
and MAP_CurrentValue for fetching snapshots for mapped tags.

Cleaned up get_unit() and get_description() while refactoring helpers.
The implementation of search() is still rather horrendous, but it needs
to be refactored at some point anyway, so leaving it alone for now.
All methods called _generate_*_for_search are used by search() only.
@einarsi einarsi merged commit d57852f into master Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant