试图获取uWSGI ini文件以正确启动Channels 2。
频道1,如下所示:
attach-daemon = %(release)/env/bin/daphne -u /opt/sock.ws --ws-protocol "graphql-ws" --proxy-headers -v 1 asgi:channel_layer
attach-daemon = %(release)/env/bin/python manage.py runworker --thread=2 --only-channels=websocket.*
在第2频道中,我尝试过:
attach-daemon = %(release)/env/bin/daphne -u /opt/sock.ws --ws-protocol "graphql-ws" --proxy-headers -v 1 asgi:channel_layer
attach-daemon = %(release)/env/bin/python manage.py runworker websocket
当然,因为我已经修复了asgi.py,所以asgi:channel_layer现在指向该应用程序,但是似乎工作人员似乎从未收到过消息(websocket当然是我的路线名称)
有什么想法吗?