{"action":"created","issue":{"url":"https://api.github.com/repos/niwinz/django-redis/issues/393","repository_url":"https://api.github.com/repos/niwinz/django-redis","labels_url":"https://api.github.com/repos/niwinz/django-redis/issues/393/labels{/name}","comments_url":"https://api.github.com/repos/niwinz/django-redis/issues/393/comments","events_url":"https://api.github.com/repos/niwinz/django-redis/issues/393/events","html_url":"https://github.com/niwinz/django-redis/pull/393","id":498578128,"node_id":"MDExOlB1bGxSZXF1ZXN0MzIxNDgyMjg4","number":393,"title":"Forward thread_local param to redis client","user":{"login":"sindrig","id":683742,"node_id":"MDQ6VXNlcjY4Mzc0Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/683742?v=4","gravatar_id":"","url":"https://api.github.com/users/sindrig","html_url":"https://github.com/sindrig","followers_url":"https://api.github.com/users/sindrig/followers","following_url":"https://api.github.com/users/sindrig/following{/other_user}","gists_url":"https://api.github.com/users/sindrig/gists{/gist_id}","starred_url":"https://api.github.com/users/sindrig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindrig/subscriptions","organizations_url":"https://api.github.com/users/sindrig/orgs","repos_url":"https://api.github.com/users/sindrig/repos","events_url":"https://api.github.com/users/sindrig/events{/privacy}","received_events_url":"https://api.github.com/users/sindrig/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2019-09-25T23:53:40Z","updated_at":"2020-01-10T13:46:48Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/niwinz/django-redis/pulls/393","html_url":"https://github.com/niwinz/django-redis/pull/393","diff_url":"https://github.com/niwinz/django-redis/pull/393.diff","patch_url":"https://github.com/niwinz/django-redis/pull/393.patch"},"body":"I need to forward an acquired lock to a worker thread that should release it. From redis-py docs:\r\n\r\n        In some use cases it's necessary to disable thread local storage. For\r\n        example, if you have code where one thread acquires a lock and passes\r\n        that lock instance to a worker thread to release later. If thread\r\n        local storage isn't disabled in this case, the worker thread won't see\r\n        the token set by the thread that acquired the lock. Our assumption\r\n        is that these cases aren't common and as such default to using\r\n        thread local storage."},"comment":{"url":"https://api.github.com/repos/niwinz/django-redis/issues/comments/573041564","html_url":"https://github.com/niwinz/django-redis/pull/393#issuecomment-573041564","issue_url":"https://api.github.com/repos/niwinz/django-redis/issues/393","id":573041564,"node_id":"MDEyOklzc3VlQ29tbWVudDU3MzA0MTU2NA==","user":{"login":"sindrig","id":683742,"node_id":"MDQ6VXNlcjY4Mzc0Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/683742?v=4","gravatar_id":"","url":"https://api.github.com/users/sindrig","html_url":"https://github.com/sindrig","followers_url":"https://api.github.com/users/sindrig/followers","following_url":"https://api.github.com/users/sindrig/following{/other_user}","gists_url":"https://api.github.com/users/sindrig/gists{/gist_id}","starred_url":"https://api.github.com/users/sindrig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindrig/subscriptions","organizations_url":"https://api.github.com/users/sindrig/orgs","repos_url":"https://api.github.com/users/sindrig/repos","events_url":"https://api.github.com/users/sindrig/events{/privacy}","received_events_url":"https://api.github.com/users/sindrig/received_events","type":"User","site_admin":false},"created_at":"2020-01-10T13:46:48Z","updated_at":"2020-01-10T13:46:48Z","author_association":"NONE","body":"I added a test showing the usage and also forwarded the parameter to the sharded client.\r\n\r\nI am not opposed to the general idea of having `**options` forwarded to the client, but it wouldn't be consistent with the api of this package. I feel like if we want to take that route we should introduce it to all wrapper functions at the same time.  In the end it's more of a design question IMO, and I guess it boils down to whether or not there are more cases like this one.\r\n\r\nIf you want to I can easily change my PR to do `**options` forwarding instead of `thread_local`."}}
{"actor":{"display_login":"sindrig"}}