prebleme with sqlalchemy and thread