jbaselga commited on
Commit
c362d87
·
verified ·
1 Parent(s): 2b24886

Update api_server.py

Browse files
Files changed (1) hide show
  1. api_server.py +8 -0
api_server.py CHANGED
@@ -176,3 +176,11 @@ def read_root():
176
  </html>
177
  """
178
 
 
 
 
 
 
 
 
 
 
176
  </html>
177
  """
178
 
179
+ import threading
180
+
181
+ def run_agent():
182
+ import app
183
+ app.main()
184
+
185
+ # Ejecuta el agente en un hilo aparte al arrancar el servidor
186
+ threading.Thread(target=run_agent, daemon=True).start()