{"action":"created","issue":{"url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/issues/1180","repository_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic","labels_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/issues/1180/labels{/name}","comments_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/issues/1180/comments","events_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/issues/1180/events","html_url":"https://github.com/SmartThingsCommunity/SmartThingsPublic/pull/1180","id":174344298,"number":1180,"title":"[DVCSMP-1979] Use async http for polling and refresh tokens.","user":{"login":"jimmyjames","id":276225,"avatar_url":"https://avatars.githubusercontent.com/u/276225?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmyjames","html_url":"https://github.com/jimmyjames","followers_url":"https://api.github.com/users/jimmyjames/followers","following_url":"https://api.github.com/users/jimmyjames/following{/other_user}","gists_url":"https://api.github.com/users/jimmyjames/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmyjames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmyjames/subscriptions","organizations_url":"https://api.github.com/users/jimmyjames/orgs","repos_url":"https://api.github.com/users/jimmyjames/repos","events_url":"https://api.github.com/users/jimmyjames/events{/privacy}","received_events_url":"https://api.github.com/users/jimmyjames/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/labels/DO_NOT_MERGE","name":"DO_NOT_MERGE","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-31T18:28:17Z","updated_at":"2016-09-06T15:35:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/pulls/1180","html_url":"https://github.com/SmartThingsCommunity/SmartThingsPublic/pull/1180","diff_url":"https://github.com/SmartThingsCommunity/SmartThingsPublic/pull/1180.diff","patch_url":"https://github.com/SmartThingsCommunity/SmartThingsPublic/pull/1180.patch"},"body":"This change makes certain HTTP requests asynchronous to reduce SmartApp execution time spent waiting for HTTP responses. The following requests are made to be asynchronous:\r\n\r\n* Scheduled polling (polling happens every 5 minutes)\r\n* Refresh token requests (Ecobee tokens last one hour)\r\n\r\nThe following HTTP requests have NOT been made asynchronous:\r\n\r\n* OAuth request during install. This cannot be async since response is used to drive dynamic pages flow.\r\n* Initial poll. Changing this to async would change the current behavior (currently if initial poll fails, it will cause initialize() to fail. Perhaps this can be changed, but left it as-is currently since it preserves existing behavior, and really there's not much of a performance gain since it is a low-frequency occurence)\r\n* Command execution. Changing command execution will require a larger refactoring and has impacts not yet fully understood. Will do this in a later PR if possible.\r\n\r\nThis change depends on SHARD-33 and SAPLAT-7.\r\n\r\n@dsainteclaire @DougSven \r\n"},"comment":{"url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/issues/comments/244991147","html_url":"https://github.com/SmartThingsCommunity/SmartThingsPublic/pull/1180#issuecomment-244991147","issue_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/issues/1180","id":244991147,"user":{"login":"DougSven","id":1282399,"avatar_url":"https://avatars.githubusercontent.com/u/1282399?v=3","gravatar_id":"","url":"https://api.github.com/users/DougSven","html_url":"https://github.com/DougSven","followers_url":"https://api.github.com/users/DougSven/followers","following_url":"https://api.github.com/users/DougSven/following{/other_user}","gists_url":"https://api.github.com/users/DougSven/gists{/gist_id}","starred_url":"https://api.github.com/users/DougSven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DougSven/subscriptions","organizations_url":"https://api.github.com/users/DougSven/orgs","repos_url":"https://api.github.com/users/DougSven/repos","events_url":"https://api.github.com/users/DougSven/events{/privacy}","received_events_url":"https://api.github.com/users/DougSven/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T15:35:44Z","updated_at":"2016-09-06T15:35:44Z","body":"👍 Looks good. Glad to see you could at reuse a lot of code between the async/sync processes."}}
{"actor":{"display_login":"DougSven"}}