{"action":"created","issue":{"url":"https://api.github.com/repos/django/asgi_redis/issues/28","repository_url":"https://api.github.com/repos/django/asgi_redis","labels_url":"https://api.github.com/repos/django/asgi_redis/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/django/asgi_redis/issues/28/comments","events_url":"https://api.github.com/repos/django/asgi_redis/issues/28/events","html_url":"https://github.com/django/asgi_redis/issues/28","id":204621060,"number":28,"title":"Expose more redis-py configuration options","user":{"login":"edevil","id":12426,"avatar_url":"https://avatars.githubusercontent.com/u/12426?v=3","gravatar_id":"","url":"https://api.github.com/users/edevil","html_url":"https://github.com/edevil","followers_url":"https://api.github.com/users/edevil/followers","following_url":"https://api.github.com/users/edevil/following{/other_user}","gists_url":"https://api.github.com/users/edevil/gists{/gist_id}","starred_url":"https://api.github.com/users/edevil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edevil/subscriptions","organizations_url":"https://api.github.com/users/edevil/orgs","repos_url":"https://api.github.com/users/edevil/repos","events_url":"https://api.github.com/users/edevil/events{/privacy}","received_events_url":"https://api.github.com/users/edevil/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-01T15:49:52Z","updated_at":"2017-02-16T18:19:30Z","closed_at":"2017-02-16T18:15:33Z","body":"There are a number of redis-py configuration options that are useful and should be exposed by asgi_redis. Some of them can already be configured via a connection URL, but there are others which cannot.\r\n\r\n- ```socket_connect_timeout```: Integer. Number of seconds to wait for the connection to be established.\r\n- ```socket_timeout```: Integer. Number of seconds to wait for a response to a Redis command. Has to be higher than 5 otherwise the ```BLPOP``` operation used by the workers will always timeout.\r\n- ```socket_keepalive```: Boolean. Wether to turn on TCP keepalives.\r\n- ```socket_keepalive_options```: Dict with values used to configure the keepalive mechanism. It is supposed to use as keys the socket options (socket.TCP_KEEPIDLE, socket.TCP_KEEPCNT, socket.TCP_KEEPINTVL) however, in MacOS, the socket.TCP_KEEPIDLE constant does not exist. According to https://opensource.apple.com/source/xnu/xnu-2422.115.4/bsd/netinet/tcp.h the constant that we need is TCP_KEEPALIVE, which has a value of 0x10, so in theory we can pass that value as key in the dict to set the correct value. But maybe it's better to hide this mess from users.\r\n\r\nRelated to #26."},"comment":{"url":"https://api.github.com/repos/django/asgi_redis/issues/comments/280413678","html_url":"https://github.com/django/asgi_redis/issues/28#issuecomment-280413678","issue_url":"https://api.github.com/repos/django/asgi_redis/issues/28","id":280413678,"user":{"login":"edevil","id":12426,"avatar_url":"https://avatars.githubusercontent.com/u/12426?v=3","gravatar_id":"","url":"https://api.github.com/users/edevil","html_url":"https://github.com/edevil","followers_url":"https://api.github.com/users/edevil/followers","following_url":"https://api.github.com/users/edevil/following{/other_user}","gists_url":"https://api.github.com/users/edevil/gists{/gist_id}","starred_url":"https://api.github.com/users/edevil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edevil/subscriptions","organizations_url":"https://api.github.com/users/edevil/orgs","repos_url":"https://api.github.com/users/edevil/repos","events_url":"https://api.github.com/users/edevil/events{/privacy}","received_events_url":"https://api.github.com/users/edevil/received_events","type":"User","site_admin":false},"created_at":"2017-02-16T18:19:30Z","updated_at":"2017-02-16T18:19:30Z","body":"Thanks!"}}
{"actor":{"display_login":"edevil"}}