{"action":"closed","number":78,"pull_request":{"url":"https://api.github.com/repos/textileio/textile-mobile/pulls/78","id":187592731,"html_url":"https://github.com/textileio/textile-mobile/pull/78","diff_url":"https://github.com/textileio/textile-mobile/pull/78.diff","patch_url":"https://github.com/textileio/textile-mobile/pull/78.patch","issue_url":"https://api.github.com/repos/textileio/textile-mobile/issues/78","number":78,"state":"closed","locked":false,"title":"Node lifecycle management","user":{"login":"asutula","id":528969,"avatar_url":"https://avatars3.githubusercontent.com/u/528969?v=4","gravatar_id":"","url":"https://api.github.com/users/asutula","html_url":"https://github.com/asutula","followers_url":"https://api.github.com/users/asutula/followers","following_url":"https://api.github.com/users/asutula/following{/other_user}","gists_url":"https://api.github.com/users/asutula/gists{/gist_id}","starred_url":"https://api.github.com/users/asutula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asutula/subscriptions","organizations_url":"https://api.github.com/users/asutula/orgs","repos_url":"https://api.github.com/users/asutula/repos","events_url":"https://api.github.com/users/asutula/events{/privacy}","received_events_url":"https://api.github.com/users/asutula/received_events","type":"User","site_admin":false},"body":"This makes some big changes to the way we start/stop the node and query photos. Main changes:\r\n\r\n1. The only trigger now is app state transition\r\n2. Location updates do result in app state transitions\r\n3. Created a lock so that only one node management/photo query can be in flight at the same time\r\n4. If the app is launched into the background (because of a location update, for example), the node is started, photos are queried, and then the node is shut down.\r\n\r\nKnown issue:\r\nTriggers like location change that don't result in an app state transition are ignored right now. This isn't ideal, but also is not very common. For example, if the app is in the foreground and gets a location update, nothing will happen. Similarly, if the app is in a background state and gets a location update, nothing will happen. This case is not ideal, but also the app will often be terminated and launching from terminated into background will trigger the node to start and photos to be queried.","created_at":"2018-05-11T23:56:58Z","updated_at":"2018-05-12T04:18:00Z","closed_at":"2018-05-12T04:18:00Z","merged_at":"2018-05-12T04:18:00Z","merge_commit_sha":"2ba72fa9ebbace391ec50ef40922e7f75a42cb4a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"sanderpick","id":361000,"avatar_url":"https://avatars0.githubusercontent.com/u/361000?v=4","gravatar_id":"","url":"https://api.github.com/users/sanderpick","html_url":"https://github.com/sanderpick","followers_url":"https://api.github.com/users/sanderpick/followers","following_url":"https://api.github.com/users/sanderpick/following{/other_user}","gists_url":"https://api.github.com/users/sanderpick/gists{/gist_id}","starred_url":"https://api.github.com/users/sanderpick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanderpick/subscriptions","organizations_url":"https://api.github.com/users/sanderpick/orgs","repos_url":"https://api.github.com/users/sanderpick/repos","events_url":"https://api.github.com/users/sanderpick/events{/privacy}","received_events_url":"https://api.github.com/users/sanderpick/received_events","type":"User","site_admin":false},{"login":"carsonfarmer","id":1220613,"avatar_url":"https://avatars3.githubusercontent.com/u/1220613?v=4","gravatar_id":"","url":"https://api.github.com/users/carsonfarmer","html_url":"https://github.com/carsonfarmer","followers_url":"https://api.github.com/users/carsonfarmer/followers","following_url":"https://api.github.com/users/carsonfarmer/following{/other_user}","gists_url":"https://api.github.com/users/carsonfarmer/gists{/gist_id}","starred_url":"https://api.github.com/users/carsonfarmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carsonfarmer/subscriptions","organizations_url":"https://api.github.com/users/carsonfarmer/orgs","repos_url":"https://api.github.com/users/carsonfarmer/repos","events_url":"https://api.github.com/users/carsonfarmer/events{/privacy}","received_events_url":"https://api.github.com/users/carsonfarmer/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/textileio/textile-mobile/pulls/78/commits","review_comments_url":"https://api.github.com/repos/textileio/textile-mobile/pulls/78/comments","review_comment_url":"https://api.github.com/repos/textileio/textile-mobile/pulls/comments{/number}","comments_url":"https://api.github.com/repos/textileio/textile-mobile/issues/78/comments","statuses_url":"https://api.github.com/repos/textileio/textile-mobile/statuses/1a63e9f326ca2c2e54d3a1d77be4aa5af340fcb5","head":{"label":"textileio:asutula/node-lifecycle-management","ref":"asutula/node-lifecycle-management","sha":"1a63e9f326ca2c2e54d3a1d77be4aa5af340fcb5","user":{"login":"textileio","id":35050041,"avatar_url":"https://avatars3.githubusercontent.com/u/35050041?v=4","gravatar_id":"","url":"https://api.github.com/users/textileio","html_url":"https://github.com/textileio","followers_url":"https://api.github.com/users/textileio/followers","following_url":"https://api.github.com/users/textileio/following{/other_user}","gists_url":"https://api.github.com/users/textileio/gists{/gist_id}","starred_url":"https://api.github.com/users/textileio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/textileio/subscriptions","organizations_url":"https://api.github.com/users/textileio/orgs","repos_url":"https://api.github.com/users/textileio/repos","events_url":"https://api.github.com/users/textileio/events{/privacy}","received_events_url":"https://api.github.com/users/textileio/received_events","type":"Organization","site_admin":false},"repo":{"id":128835983,"name":"textile-mobile","full_name":"textileio/textile-mobile","owner":{"login":"textileio","id":35050041,"avatar_url":"https://avatars3.githubusercontent.com/u/35050041?v=4","gravatar_id":"","url":"https://api.github.com/users/textileio","html_url":"https://github.com/textileio","followers_url":"https://api.github.com/users/textileio/followers","following_url":"https://api.github.com/users/textileio/following{/other_user}","gists_url":"https://api.github.com/users/textileio/gists{/gist_id}","starred_url":"https://api.github.com/users/textileio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/textileio/subscriptions","organizations_url":"https://api.github.com/users/textileio/orgs","repos_url":"https://api.github.com/users/textileio/repos","events_url":"https://api.github.com/users/textileio/events{/privacy}","received_events_url":"https://api.github.com/users/textileio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/textileio/textile-mobile","description":"Encrypted, secure, decentralized personal data wallet -- technology behind textile.photos","fork":false,"url":"https://api.github.com/repos/textileio/textile-mobile","forks_url":"https://api.github.com/repos/textileio/textile-mobile/forks","keys_url":"https://api.github.com/repos/textileio/textile-mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/textileio/textile-mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/textileio/textile-mobile/teams","hooks_url":"https://api.github.com/repos/textileio/textile-mobile/hooks","issue_events_url":"https://api.github.com/repos/textileio/textile-mobile/issues/events{/number}","events_url":"https://api.github.com/repos/textileio/textile-mobile/events","assignees_url":"https://api.github.com/repos/textileio/textile-mobile/assignees{/user}","branches_url":"https://api.github.com/repos/textileio/textile-mobile/branches{/branch}","tags_url":"https://api.github.com/repos/textileio/textile-mobile/tags","blobs_url":"https://api.github.com/repos/textileio/textile-mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/textileio/textile-mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/textileio/textile-mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/textileio/textile-mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/textileio/textile-mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/textileio/textile-mobile/languages","stargazers_url":"https://api.github.com/repos/textileio/textile-mobile/stargazers","contributors_url":"https://api.github.com/repos/textileio/textile-mobile/contributors","subscribers_url":"https://api.github.com/repos/textileio/textile-mobile/subscribers","subscription_url":"https://api.github.com/repos/textileio/textile-mobile/subscription","commits_url":"https://api.github.com/repos/textileio/textile-mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/textileio/textile-mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/textileio/textile-mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/textileio/textile-mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/textileio/textile-mobile/contents/{+path}","compare_url":"https://api.github.com/repos/textileio/textile-mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/textileio/textile-mobile/merges","archive_url":"https://api.github.com/repos/textileio/textile-mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/textileio/textile-mobile/downloads","issues_url":"https://api.github.com/repos/textileio/textile-mobile/issues{/number}","pulls_url":"https://api.github.com/repos/textileio/textile-mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/textileio/textile-mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/textileio/textile-mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/textileio/textile-mobile/labels{/name}","releases_url":"https://api.github.com/repos/textileio/textile-mobile/releases{/id}","deployments_url":"https://api.github.com/repos/textileio/textile-mobile/deployments","created_at":"2018-04-09T21:28:41Z","updated_at":"2018-05-12T03:16:10Z","pushed_at":"2018-05-12T04:18:00Z","git_url":"git://github.com/textileio/textile-mobile.git","ssh_url":"git@github.com:textileio/textile-mobile.git","clone_url":"https://github.com/textileio/textile-mobile.git","svn_url":"https://github.com/textileio/textile-mobile","homepage":"https://www.textile.photos/","size":1738763,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":7,"watchers":5,"default_branch":"master"}},"base":{"label":"textileio:master","ref":"master","sha":"819b68ab68b0f99518a04d3f3093d38af97b8304","user":{"login":"textileio","id":35050041,"avatar_url":"https://avatars3.githubusercontent.com/u/35050041?v=4","gravatar_id":"","url":"https://api.github.com/users/textileio","html_url":"https://github.com/textileio","followers_url":"https://api.github.com/users/textileio/followers","following_url":"https://api.github.com/users/textileio/following{/other_user}","gists_url":"https://api.github.com/users/textileio/gists{/gist_id}","starred_url":"https://api.github.com/users/textileio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/textileio/subscriptions","organizations_url":"https://api.github.com/users/textileio/orgs","repos_url":"https://api.github.com/users/textileio/repos","events_url":"https://api.github.com/users/textileio/events{/privacy}","received_events_url":"https://api.github.com/users/textileio/received_events","type":"Organization","site_admin":false},"repo":{"id":128835983,"name":"textile-mobile","full_name":"textileio/textile-mobile","owner":{"login":"textileio","id":35050041,"avatar_url":"https://avatars3.githubusercontent.com/u/35050041?v=4","gravatar_id":"","url":"https://api.github.com/users/textileio","html_url":"https://github.com/textileio","followers_url":"https://api.github.com/users/textileio/followers","following_url":"https://api.github.com/users/textileio/following{/other_user}","gists_url":"https://api.github.com/users/textileio/gists{/gist_id}","starred_url":"https://api.github.com/users/textileio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/textileio/subscriptions","organizations_url":"https://api.github.com/users/textileio/orgs","repos_url":"https://api.github.com/users/textileio/repos","events_url":"https://api.github.com/users/textileio/events{/privacy}","received_events_url":"https://api.github.com/users/textileio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/textileio/textile-mobile","description":"Encrypted, secure, decentralized personal data wallet -- technology behind textile.photos","fork":false,"url":"https://api.github.com/repos/textileio/textile-mobile","forks_url":"https://api.github.com/repos/textileio/textile-mobile/forks","keys_url":"https://api.github.com/repos/textileio/textile-mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/textileio/textile-mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/textileio/textile-mobile/teams","hooks_url":"https://api.github.com/repos/textileio/textile-mobile/hooks","issue_events_url":"https://api.github.com/repos/textileio/textile-mobile/issues/events{/number}","events_url":"https://api.github.com/repos/textileio/textile-mobile/events","assignees_url":"https://api.github.com/repos/textileio/textile-mobile/assignees{/user}","branches_url":"https://api.github.com/repos/textileio/textile-mobile/branches{/branch}","tags_url":"https://api.github.com/repos/textileio/textile-mobile/tags","blobs_url":"https://api.github.com/repos/textileio/textile-mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/textileio/textile-mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/textileio/textile-mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/textileio/textile-mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/textileio/textile-mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/textileio/textile-mobile/languages","stargazers_url":"https://api.github.com/repos/textileio/textile-mobile/stargazers","contributors_url":"https://api.github.com/repos/textileio/textile-mobile/contributors","subscribers_url":"https://api.github.com/repos/textileio/textile-mobile/subscribers","subscription_url":"https://api.github.com/repos/textileio/textile-mobile/subscription","commits_url":"https://api.github.com/repos/textileio/textile-mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/textileio/textile-mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/textileio/textile-mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/textileio/textile-mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/textileio/textile-mobile/contents/{+path}","compare_url":"https://api.github.com/repos/textileio/textile-mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/textileio/textile-mobile/merges","archive_url":"https://api.github.com/repos/textileio/textile-mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/textileio/textile-mobile/downloads","issues_url":"https://api.github.com/repos/textileio/textile-mobile/issues{/number}","pulls_url":"https://api.github.com/repos/textileio/textile-mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/textileio/textile-mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/textileio/textile-mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/textileio/textile-mobile/labels{/name}","releases_url":"https://api.github.com/repos/textileio/textile-mobile/releases{/id}","deployments_url":"https://api.github.com/repos/textileio/textile-mobile/deployments","created_at":"2018-04-09T21:28:41Z","updated_at":"2018-05-12T03:16:10Z","pushed_at":"2018-05-12T04:18:00Z","git_url":"git://github.com/textileio/textile-mobile.git","ssh_url":"git@github.com:textileio/textile-mobile.git","clone_url":"https://github.com/textileio/textile-mobile.git","svn_url":"https://github.com/textileio/textile-mobile","homepage":"https://www.textile.photos/","size":1738763,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":7,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/textileio/textile-mobile/pulls/78"},"html":{"href":"https://github.com/textileio/textile-mobile/pull/78"},"issue":{"href":"https://api.github.com/repos/textileio/textile-mobile/issues/78"},"comments":{"href":"https://api.github.com/repos/textileio/textile-mobile/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/textileio/textile-mobile/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/textileio/textile-mobile/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/textileio/textile-mobile/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/textileio/textile-mobile/statuses/1a63e9f326ca2c2e54d3a1d77be4aa5af340fcb5"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"andrewxhill","id":370259,"avatar_url":"https://avatars2.githubusercontent.com/u/370259?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewxhill","html_url":"https://github.com/andrewxhill","followers_url":"https://api.github.com/users/andrewxhill/followers","following_url":"https://api.github.com/users/andrewxhill/following{/other_user}","gists_url":"https://api.github.com/users/andrewxhill/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewxhill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewxhill/subscriptions","organizations_url":"https://api.github.com/users/andrewxhill/orgs","repos_url":"https://api.github.com/users/andrewxhill/repos","events_url":"https://api.github.com/users/andrewxhill/events{/privacy}","received_events_url":"https://api.github.com/users/andrewxhill/received_events","type":"User","site_admin":false},"comments":4,"review_comments":1,"maintainer_can_modify":false,"commits":6,"additions":90,"deletions":33,"changed_files":6}}
{"actor":{"display_login":"andrewxhill"}}