Database construction: convert database in psycopg2 to sqlite3
All database parts have been converted to SQLite3 for simplicity in docker. However, there are some problems when integrating SQLite3 and Threading. The program has chances to hang there because it is stuck in the block below. `while True: next_test_time = lims_queue[mrn].queue[0]
if test_time == next_test_time:
break
`
This could only happen after I change the database, because SQLite3 no longer supports connection pooling, and we must init a new connection for each message. Only one connection can work for a specific time.
Hence, the time is much longer than before.
I also tried code without queue, and latency is fine. But the problem of threading will appear again. :(