alphagov/spotlight — pull request #357 by annapowellsmith (2014-04-08 16:56:58+00:00)
Title: Discard any data over 24 hours old in realtime view.

Some of our realtime views show 25 or 26 hours' worth
of data. This is because our realtime collections inherit
from the list collection, and so we return the latest N
data points, with no control over how old these are. If
the realtime collectors have been down at any point in the
last 24 hours, the data returned can go back further in
time.

So: add a small fix in the realtime view to discard any
data that is more than 24 hours older than the most
recent data point. This will stop the confusing messages
about there being 25 hours' worth of data.

We have a story for a proper fix, which is to convert
the realtime collections to use timestamps, rather than
inherit from the list collection. However, this fix will
work in the short term.

Pivotal bug: https://www.pivotaltracker.com/s/projects/911874/stories/66658940

Pivotal story for proper fix: https://www.pivotaltracker.com/s/projects/911874/stories/65897896