Queue is thread-safe but not process-shared.
Could you please show your uvicorn command for running server?
Also, I see you using debug=True. This command involves reloading, which can create two processes.
I could suggest you:
app.run(host='0.0.0.0', port=PORT_UI, debug=False)
print(os.getpid())