Closed wade-tattersall closed 6 years ago
Hi Wade, You've done nothing wrong, I have! We don't use that configuration in production, and I shouldn't have put it in the example settings. We use this:
CHANNEL_LAYERS = {
"default": {
"BACKEND": "asgi_redis.RedisChannelLayer",
"CONFIG": {
"hosts": [os.environ.get('REDIS_URL','redis://localhost:6379')],
},
"ROUTING": "numbasltiprovider.routing.channel_routing",
},
}
I've updated first_setup.py
so it sets CHANNEL_LAYERS
correctly. You can either run that again, or copy the code I put above, to get the right channel layer. Please let me know how you get on, and close this issue if you get it working.
Thank you, it works perfectly.
I'm trying to set-up a numbas-lti server at my institution. I've followed the instructions as per the documentation, as near as I can tell, although I've had to make minor tweaks because I'm running on RHEL 6 instead of Ubuntu. I'm using nginx as recommended. I have some Django experience and a lot of general python experience, but I'm new to Channels.
I think I had to copy the
settings.py.dist
file tosettings.py
, and thenfirst_setup.py
was able to complete the templating.However, the settings for the channels is
When I try to run the worker processes with
/srv/numbas-lti-provider/manage.py runworker
, either manually or through the supervisor task, it crashes withThis is unsurprising, since the daphne server is a separate process to the workers, so of course an in-memory layer won't work, so I don't understand why numbas-lti's settings are set to use that backend.
From stepping through the code I can't see any way 'runworker' can be used with an
inmemory
backend at all.Notably, the daphne process takes a numbasltiprovider.asgi:channel_layer parameter in the supervisor config. Should there be some equivalent for the worker processes?
What have I done wrong?