WINTER watchdog: always look at the past 2 nights. #413
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For winter since the topics are expressed in local time we already did UTC date - 1 to get the topic we want to look at.
Another issue is that at 0 UTC is when we move to new topics (when we also restart the machine every day btw), so if the WINTER alerts (that are processed and sent to IPAC manually every day, after the night of observation) are sent at or after that time, upon reboot we already are listening to the next topic and won't read the data from the previous night.
So in this PR, we just make the
obsdate
parameter a list (obsdates
), which defaults to not just UTC -1, but UTC -1 AND UTC -2.We could consider looking back a third day just to be safe, might want to just make that configurable at some point.