🦝 Fix uvicorn workers with import string

Workers require 'speech:app' import string, not app object directly
This commit is contained in:
Russell Ballestrini 2025-11-09 17:10:08 -05:00
parent 459e8d5896
commit aeebb69a8c

View file

@ -819,4 +819,5 @@ if __name__ == "__main__":
# Use multiple workers for true concurrency (each worker = separate process with own GIL)
# This prevents thread pool exhaustion and allows concurrent model loading
uvicorn.run(app, host=args.host, port=args.port, workers=4, timeout_keep_alive=300)
# Must use import string format for workers to function
uvicorn.run("speech:app", host=args.host, port=args.port, workers=4, timeout_keep_alive=300)