{"action":"created","issue":{"url":"https://api.github.com/repos/django/channels/issues/1290","repository_url":"https://api.github.com/repos/django/channels","labels_url":"https://api.github.com/repos/django/channels/issues/1290/labels{/name}","comments_url":"https://api.github.com/repos/django/channels/issues/1290/comments","events_url":"https://api.github.com/repos/django/channels/issues/1290/events","html_url":"https://github.com/django/channels/pull/1290","id":440534028,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjc2MDU3MzIy","number":1290,"title":"Fix DatabaseSyncToAsync","user":{"login":"blueyed","id":9766,"node_id":"MDQ6VXNlcjk3NjY=","avatar_url":"https://avatars1.githubusercontent.com/u/9766?v=4","gravatar_id":"","url":"https://api.github.com/users/blueyed","html_url":"https://github.com/blueyed","followers_url":"https://api.github.com/users/blueyed/followers","following_url":"https://api.github.com/users/blueyed/following{/other_user}","gists_url":"https://api.github.com/users/blueyed/gists{/gist_id}","starred_url":"https://api.github.com/users/blueyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueyed/subscriptions","organizations_url":"https://api.github.com/users/blueyed/orgs","repos_url":"https://api.github.com/users/blueyed/repos","events_url":"https://api.github.com/users/blueyed/events{/privacy}","received_events_url":"https://api.github.com/users/blueyed/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2019-05-06T04:12:59Z","updated_at":"2019-11-15T02:03:08Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/django/channels/pulls/1290","html_url":"https://github.com/django/channels/pull/1290","diff_url":"https://github.com/django/channels/pull/1290.diff","patch_url":"https://github.com/django/channels/pull/1290.patch"},"body":"- copy/use connections from the main thread, which are in an atomic\r\n  block (used in tests)\r\n- do not close connections in atomic blocks\r\n\r\nRef: https://github.com/django/channels/issues/1091#issuecomment-489488831"},"comment":{"url":"https://api.github.com/repos/django/channels/issues/comments/554175566","html_url":"https://github.com/django/channels/pull/1290#issuecomment-554175566","issue_url":"https://api.github.com/repos/django/channels/issues/1290","id":554175566,"node_id":"MDEyOklzc3VlQ29tbWVudDU1NDE3NTU2Ng==","user":{"login":"adamhooper","id":10812,"node_id":"MDQ6VXNlcjEwODEy","avatar_url":"https://avatars3.githubusercontent.com/u/10812?v=4","gravatar_id":"","url":"https://api.github.com/users/adamhooper","html_url":"https://github.com/adamhooper","followers_url":"https://api.github.com/users/adamhooper/followers","following_url":"https://api.github.com/users/adamhooper/following{/other_user}","gists_url":"https://api.github.com/users/adamhooper/gists{/gist_id}","starred_url":"https://api.github.com/users/adamhooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamhooper/subscriptions","organizations_url":"https://api.github.com/users/adamhooper/orgs","repos_url":"https://api.github.com/users/adamhooper/repos","events_url":"https://api.github.com/users/adamhooper/events{/privacy}","received_events_url":"https://api.github.com/users/adamhooper/received_events","type":"User","site_admin":false},"created_at":"2019-11-15T02:03:08Z","updated_at":"2019-11-15T02:03:08Z","author_association":"NONE","body":"(Also: what happens if a Python module that decorates a function with `@database_sync_to_async` is imported from a thread that isn't the main thread? Then its so-called \"main\" connection will actually be the _thread's_ connection. Cue the disaster scenario from my previous point....)\r\n\r\n(I understand that async atomic blocks would be nice in Django Channels. But this pull request doesn't support async atomic blocks. As far as I can tell, this pull request is just to make unit tests pass.)"}}
{"actor":{"display_login":"adamhooper"}}