18F/imls-pi-stack

Session id tracking is redundant state

cantsin opened this issue · 0 comments

(Imported from cantsin/imls-pi-stack#10)

Instead of a counter in the DB, it might be better to just ask what DISTINCT session IDs are in the durations table (at startup), and then increment by one.

If we do this every time we startup, and simply track the session ID in RAM as we execute, we'll always have a correct session ID, and we can eliminate a piece of state.

(I think. That bears more thinking/discussion. But I wouldn't mind removing an explicit piece of state when it already exists somewhere else, and the possibility of it getting out-of-sync is real.)