thread bug fix for sqlite
This commit is contained in:
parent
40f43aefb2
commit
1b9f75ebb4
9
main.py
9
main.py
@ -26,11 +26,12 @@ if __name__ == "__main__":
|
|||||||
t1 = threading.Thread(target=lambda:start_backend_process(config=_config))
|
t1 = threading.Thread(target=lambda:start_backend_process(config=_config))
|
||||||
t1.start()
|
t1.start()
|
||||||
# sleep until backend is started, so that API server can function correctly (TODO: sleep until backend process returns some flag indicating its started)
|
# sleep until backend is started, so that API server can function correctly (TODO: sleep until backend process returns some flag indicating its started)
|
||||||
time.sleep(DELAY_API_SERVER_START)
|
#time.sleep(DELAY_API_SERVER_START)
|
||||||
|
|
||||||
# start the API server
|
# start the API server
|
||||||
t2 = threading.Thread(target=lambda: start_api_server(config=_config))
|
start_api_server(config=_config)
|
||||||
t2.start()
|
#t2 = threading.Thread(target=lambda: start_api_server(config=_config))
|
||||||
|
#t2.start()
|
||||||
|
|
||||||
t1.join()
|
t1.join()
|
||||||
t2.join()
|
#t2.join()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user