'RedisChannelLayer' object is not callable 'RedisChannelLayer' object is not callable heroku heroku

'RedisChannelLayer' object is not callable


You are using wrong asgi configuration which was intended for channels 1.x

as documentation states should look like

"""ASGI entrypoint. Configures Django and then runs the applicationdefined in the ASGI_APPLICATION setting."""import osimport djangofrom channels.routing import get_default_applicationos.environ.setdefault("DJANGO_SETTINGS_MODULE", "myproject.settings")django.setup()application = get_default_application()


asgi.py should be like this :

import osimport djangofrom channels.routing import get_default_applicationos.environ.setdefault("DJANGO_SETTINGS_MODULE", "myproject.settings")django.setup()application = get_default_application()

and ProcFile should be like this

web: daphne myproject.asgi:application --port $PORT --bind 0.0.0.0 -v2chatworker: python manage.py runworker --settings=myproject.settings.production -v2