LowellObservatory / NightWatch

A system to display a set of important information at an observatory.
2 stars 0 forks source link

Clear table values after they exceed some limit? #23

Closed astrobokonon closed 5 years ago

astrobokonon commented 5 years ago

Right now, the TCS information is still retained in the tables after shutdown; this includes the coordinates and other stuff for the last target/pointing. I could probably clear that information using an addendum to the valJudgement checks and just clear the value property. I should probably do that by redefining things a bit:

oldAge == age after which the value remains in the class, but the tooOld flag is set maxAge == age after which the value is completely cleared and replaced with a default value

Bonus points if I remember to spin off my silly easter egg into a function that I can reuse/call for this as well.

The only remaining question is whether this will get checked/triggered if the server doesn't find any new information. There might need to be a separate step in the dataGatherer type functions that does this check even if there is no new information, but I think it is pretty simple to pick apart.

astrobokonon commented 5 years ago

Short answer - yes I can just add something to valJudgement, since I'm being sloppy and always just streaming the "new" info into the existing ColumnDataSource. I have no clear idea if that has any CPU/RAM impact, though, but if it does it's pretty minimal just judging by the logs from the weekend.

astrobokonon commented 5 years ago

Closed by Camelot@ddf05dd and now in place. Default is to clear the values after they exceed 2 hrs from the server's current time.