django / channels_redis

Redis channel layer backend for Django Channels

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing documentation on how to set `connection_kwargs` params.

slyapustin opened this issue · comments

What is the right way to specify connection_kwargs?

Based on the changelog - it was implemented a while ago, but there are no examples on how to set that and no mentions in the docs.

I'm happy to submit PR, but I can't figure out how to set them on my own 🤔

1.3.0 (2017-04-07)

  • Change the format of connection arguments to be a single dict called
    connection_kwargs rather than individual options, as they change by
    connection type. You will need to change your settings if you have any of
    socket_connect_timeout, socket_timeout, socket_keepalive or
    socket_keepalive_options set to move them into a connection_kwargs dict.

connection_kwargs will just be passed to the underlying library no?

@carltongibson How it should look in the CHANNEL_LAYERS configuration?

CHANNEL_LAYERS = {
    "default": {
        "BACKEND": "channels_redis.core.RedisChannelLayer",
        # how to pass `socket_connect_timeout`, `socket_timeout` and etc?
    }
}

This might be relevant to #331

This should be resolved by #370.