From 1b9f75ebb41496a36769d4a41818bcaebf745fe0 Mon Sep 17 00:00:00 2001 From: Sai Raj <39055732+sairajzero@users.noreply.github.com> Date: Sat, 3 Aug 2024 17:37:15 -0400 Subject: [PATCH] thread bug fix for sqlite --- main.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 9278d04..c8d7c5e 100644 --- a/main.py +++ b/main.py @@ -26,11 +26,12 @@ if __name__ == "__main__": t1 = threading.Thread(target=lambda:start_backend_process(config=_config)) 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) - time.sleep(DELAY_API_SERVER_START) + #time.sleep(DELAY_API_SERVER_START) # start the API server - t2 = threading.Thread(target=lambda: start_api_server(config=_config)) - t2.start() + start_api_server(config=_config) + #t2 = threading.Thread(target=lambda: start_api_server(config=_config)) + #t2.start() t1.join() - t2.join() + #t2.join()