谁能告诉我可能是什么问题?
警告应用程序实例
我的阿斯吉
"^subscription", channels_jwt_middleware(MyConsumer.as_asgi(schema=schema))
)
application = ProtocolTypeRouter({
"http": django_asgi_app,
"websocket":
QueryAuthMiddleware(
URLRouter([
subscription_url,
])
),
})```
my custom MyConsumer
```class MyConsumer(GraphQLWSConsumer):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.profile_id = None
async def __call__(self, scope, receive, send):
user = scope.get("user", None)
time_zone = await get_current_timezone(user)
self.profile_id = scope.get("active_profile_id", None)
self.timezone = time_zone if time_zone else settings.TIME_ZONE
await super().__call__(scope, receive, send)
async def connect(self):
await super().connect()
await change_status(True, self.profile_id)
async def disconnect(self, close_code, *args, **kwargs):
await super().disconnect(close_code)
await change_status(False, self.profile_id)```
解决我的问题
daphne -b 0.0.0.0 -p $SERVER_PORT --application-close-timeout 60 --proxy-headers server.asgi:application