{"action":"created","issue":{"url":"https://api.github.com/repos/metabase/metabase/issues/5993","repository_url":"https://api.github.com/repos/metabase/metabase","labels_url":"https://api.github.com/repos/metabase/metabase/issues/5993/labels{/name}","comments_url":"https://api.github.com/repos/metabase/metabase/issues/5993/comments","events_url":"https://api.github.com/repos/metabase/metabase/issues/5993/events","html_url":"https://github.com/metabase/metabase/pull/5993","id":258565966,"number":5993,"title":"Async X-ray computation [WIP]","user":{"login":"sbelak","id":178038,"avatar_url":"https://avatars2.githubusercontent.com/u/178038?v=4","gravatar_id":"","url":"https://api.github.com/users/sbelak","html_url":"https://github.com/sbelak","followers_url":"https://api.github.com/users/sbelak/followers","following_url":"https://api.github.com/users/sbelak/following{/other_user}","gists_url":"https://api.github.com/users/sbelak/gists{/gist_id}","starred_url":"https://api.github.com/users/sbelak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbelak/subscriptions","organizations_url":"https://api.github.com/users/sbelak/orgs","repos_url":"https://api.github.com/users/sbelak/repos","events_url":"https://api.github.com/users/sbelak/events{/privacy}","received_events_url":"https://api.github.com/users/sbelak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-09-18T17:50:33Z","updated_at":"2017-09-25T13:41:29Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/metabase/metabase/pulls/5993","html_url":"https://github.com/metabase/metabase/pull/5993","diff_url":"https://github.com/metabase/metabase/pull/5993.diff","patch_url":"https://github.com/metabase/metabase/pull/5993.patch"},"body":"Still needs\r\n- [ ] API endpoints\r\n- [x] tests\r\n- [x] docs\r\n- [x] canceling\r\n- [x] autocleanup\r\n- [ ] ~~use background threads where available~~\r\n- [x] error handling"},"comment":{"url":"https://api.github.com/repos/metabase/metabase/issues/comments/331884546","html_url":"https://github.com/metabase/metabase/pull/5993#issuecomment-331884546","issue_url":"https://api.github.com/repos/metabase/metabase/issues/5993","id":331884546,"user":{"login":"attekei","id":6034928,"avatar_url":"https://avatars2.githubusercontent.com/u/6034928?v=4","gravatar_id":"","url":"https://api.github.com/users/attekei","html_url":"https://github.com/attekei","followers_url":"https://api.github.com/users/attekei/followers","following_url":"https://api.github.com/users/attekei/following{/other_user}","gists_url":"https://api.github.com/users/attekei/gists{/gist_id}","starred_url":"https://api.github.com/users/attekei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/attekei/subscriptions","organizations_url":"https://api.github.com/users/attekei/orgs","repos_url":"https://api.github.com/users/attekei/repos","events_url":"https://api.github.com/users/attekei/events{/privacy}","received_events_url":"https://api.github.com/users/attekei/received_events","type":"User","site_admin":false},"created_at":"2017-09-25T13:41:29Z","updated_at":"2017-09-25T13:41:29Z","author_association":"MEMBER","body":"And something that is even easier to digest for getting an understanding how the API looks like:\r\n```\r\n// What follows is usage of RestfulRequest and BackgroundJobRequest which\r\n// are interchangeable in terms of the method interface of the resulting object\r\n\r\n// RestfulRequest for conventional REST API endpoints\r\n// const tableXrayRequest = new RestfulRequest({\r\n//     endpoint: XRayApi.table_xray,\r\n//     resultPropName: 'xray',\r\n//     actionPrefix: 'metabase/xray/table'\r\n// })\r\n\r\n// BackgroundJobRequest for\r\nconst tableXrayRequest = new BackgroundJobRequest({\r\n    creationEndpoint: XRayApi.async_table_xray,\r\n    statusEndpoint: XRayApi.async_status,\r\n    resultPropName: 'xray',\r\n    actionPrefix: 'metabase/xray/table'\r\n})\r\n\r\nexport const FETCH_TABLE_XRAY = 'metabase/xray/FETCH_TABLE_XRAY'\r\nexport const fetchTableXray = createThunkAction(FETCH_TABLE_XRAY, (tableId, cost) =>\r\n    async (dispatch) => {\r\n        try {\r\n            await dispatch(tableXrayRequest.trigger({ tableId, ...cost.method }))\r\n        } catch (error) {\r\n            console.error(error)\r\n        }\r\n    }\r\n)\r\n\r\nexport default handleActions({\r\n    ...tableXrayRequest.getReducers(),\r\n    <other reducers here>\r\n}, tableXrayRequest.getDefaultState())\r\n```"}}
{"actor":{"display_login":"attekei"}}