I am using multithreading in a Flask app and want each thread to append to an entry in a database. However, I can never get this to work. Per Multi-threaded use of SQLAlchem