lctva
lctva copied to clipboard
Nightly Cleanup
By default the app collects data on authorized users once every 5 seconds. So that results in 12 Nodes created per user per minute. 720 an hour. 17,280 per day. 518,500 per month... per user. Granted that is at peak usage w/ 24 hour streaming (not typical)... but it's an extreme.
I would like an end of month task that compiles all data nodes from the previous month down into 1 Node per minute. That would lower it down to about 43k nodes per user, down from a half a million.
- Find all nodes for given user in given month
- Average all nodes for a given minute
- Set one of those nodes to the average value
- Remove all other nodes for user's minute