rrevo commited on
Commit
005a35d
·
1 Parent(s): 1956157

prev chunk

Browse files
Files changed (1) hide show
  1. client/src/main.py +9 -4
client/src/main.py CHANGED
@@ -1,3 +1,4 @@
 
1
  from starlette.applications import Starlette
2
  from starlette.routing import Route
3
  from sse_starlette.sse import EventSourceResponse
@@ -130,7 +131,11 @@ def server():
130
 
131
 
132
  if __name__ == '__main__':
133
- if os.getenv('PROCESS') == 'listener':
134
- main()
135
- elif os.getenv('PROCESS') == 'server':
136
- server()
 
 
 
 
 
1
+ import threading
2
  from starlette.applications import Starlette
3
  from starlette.routing import Route
4
  from sse_starlette.sse import EventSourceResponse
 
131
 
132
 
133
  if __name__ == '__main__':
134
+ main_thread = threading.Thread(target=main)
135
+ main_thread.start()
136
+
137
+ server_thread = threading.Thread(target=server)
138
+ server_thread.start()
139
+
140
+ main_thread.join()
141
+ server_thread.join()