Research on how to get rid of passing db session in every function, may be use of thread variable?