{"action":"created","comment":{"url":"https://api.github.com/repos/TheThingsNetwork/ttn/pulls/comments/79596173","id":79596173,"diff_hunk":"@@ -21,11 +20,5 @@ func (r *router) HandleGatewayStatus(gatewayID string, status *pb_gateway.Status\n \t\t}\n \t}()\n \n-\tgateway := r.getGateway(gatewayID)\n-\tgateway.LastSeen = time.Now()\n-\terr = gateway.Status.Update(status)\n-\tif err != nil {\n-\t\treturn err\n-\t}\n-\treturn nil\n+\treturn r.getGateway(gatewayID).HandleStatus(status)","path":"core/router/gateway_status.go","position":22,"original_position":22,"commit_id":"cb884722bbadc3c6f964bb65d58e770c8e7047c8","original_commit_id":"b8e3a44e989ae3157bbaa95e53afb2afbb4915a9","user":{"login":"htdvisser","id":181308,"avatar_url":"https://avatars.githubusercontent.com/u/181308?v=3","gravatar_id":"","url":"https://api.github.com/users/htdvisser","html_url":"https://github.com/htdvisser","followers_url":"https://api.github.com/users/htdvisser/followers","following_url":"https://api.github.com/users/htdvisser/following{/other_user}","gists_url":"https://api.github.com/users/htdvisser/gists{/gist_id}","starred_url":"https://api.github.com/users/htdvisser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htdvisser/subscriptions","organizations_url":"https://api.github.com/users/htdvisser/orgs","repos_url":"https://api.github.com/users/htdvisser/repos","events_url":"https://api.github.com/users/htdvisser/events{/privacy}","received_events_url":"https://api.github.com/users/htdvisser/received_events","type":"User","site_admin":false},"body":"We have special error handling in this func:\r\n\r\n```go\r\n  \tdefer func() {\r\n  \t\tif err != nil {\r\n \t\t\tctx.WithError(err).Warn(\"Could not handle gateway status\")\r\n \t\t} else {\r\n \t\t\tctx.WithField(\"Duration\", time.Now().Sub(start)).Info(\"Handled gateway status\")\r\n  \t\t}\r\n  \t}()\r\n```\r\n\r\nFor this to work, `err` needs to be set","created_at":"2016-09-20T12:17:02Z","updated_at":"2016-09-20T12:17:02Z","html_url":"https://github.com/TheThingsNetwork/ttn/pull/261#discussion_r79596173","pull_request_url":"https://api.github.com/repos/TheThingsNetwork/ttn/pulls/261","_links":{"self":{"href":"https://api.github.com/repos/TheThingsNetwork/ttn/pulls/comments/79596173"},"html":{"href":"https://github.com/TheThingsNetwork/ttn/pull/261#discussion_r79596173"},"pull_request":{"href":"https://api.github.com/repos/TheThingsNetwork/ttn/pulls/261"}}},"pull_request":{"url":"https://api.github.com/repos/TheThingsNetwork/ttn/pulls/261","id":85797993,"html_url":"https://github.com/TheThingsNetwork/ttn/pull/261","diff_url":"https://github.com/TheThingsNetwork/ttn/pull/261.diff","patch_url":"https://github.com/TheThingsNetwork/ttn/pull/261.patch","issue_url":"https://api.github.com/repos/TheThingsNetwork/ttn/issues/261","number":261,"state":"open","locked":false,"title":"core/router/gateways: NOC integration(WIP)","user":{"login":"rvolosatovs","id":12877905,"avatar_url":"https://avatars.githubusercontent.com/u/12877905?v=3","gravatar_id":"","url":"https://api.github.com/users/rvolosatovs","html_url":"https://github.com/rvolosatovs","followers_url":"https://api.github.com/users/rvolosatovs/followers","following_url":"https://api.github.com/users/rvolosatovs/following{/other_user}","gists_url":"https://api.github.com/users/rvolosatovs/gists{/gist_id}","starred_url":"https://api.github.com/users/rvolosatovs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvolosatovs/subscriptions","organizations_url":"https://api.github.com/users/rvolosatovs/orgs","repos_url":"https://api.github.com/users/rvolosatovs/repos","events_url":"https://api.github.com/users/rvolosatovs/events{/privacy}","received_events_url":"https://api.github.com/users/rvolosatovs/received_events","type":"User","site_admin":false},"body":"NOC integration in TTN\r\n\r\nProgress:\r\n- [x] `core/router/gateway` integration\r\n- [ ] testing\r\n- [ ] initialize NOC connection\r\n- [ ] use `sync.RWMutex` instead of `sync.Mutex` in `core/router/gateway` for a possible performance benefit(?)\r\n- [ ] token validation\r\n","created_at":"2016-09-19T13:56:34Z","updated_at":"2016-09-20T12:17:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4ef9bd7a258b8b9497fdd4a99d75b5817395cbd","assignee":{"login":"htdvisser","id":181308,"avatar_url":"https://avatars.githubusercontent.com/u/181308?v=3","gravatar_id":"","url":"https://api.github.com/users/htdvisser","html_url":"https://github.com/htdvisser","followers_url":"https://api.github.com/users/htdvisser/followers","following_url":"https://api.github.com/users/htdvisser/following{/other_user}","gists_url":"https://api.github.com/users/htdvisser/gists{/gist_id}","starred_url":"https://api.github.com/users/htdvisser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htdvisser/subscriptions","organizations_url":"https://api.github.com/users/htdvisser/orgs","repos_url":"https://api.github.com/users/htdvisser/repos","events_url":"https://api.github.com/users/htdvisser/events{/privacy}","received_events_url":"https://api.github.com/users/htdvisser/received_events","type":"User","site_admin":false},"assignees":[{"login":"htdvisser","id":181308,"avatar_url":"https://avatars.githubusercontent.com/u/181308?v=3","gravatar_id":"","url":"https://api.github.com/users/htdvisser","html_url":"https://github.com/htdvisser","followers_url":"https://api.github.com/users/htdvisser/followers","following_url":"https://api.github.com/users/htdvisser/following{/other_user}","gists_url":"https://api.github.com/users/htdvisser/gists{/gist_id}","starred_url":"https://api.github.com/users/htdvisser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htdvisser/subscriptions","organizations_url":"https://api.github.com/users/htdvisser/orgs","repos_url":"https://api.github.com/users/htdvisser/repos","events_url":"https://api.github.com/users/htdvisser/events{/privacy}","received_events_url":"https://api.github.com/users/htdvisser/received_events","type":"User","site_admin":false},{"login":"rvolosatovs","id":12877905,"avatar_url":"https://avatars.githubusercontent.com/u/12877905?v=3","gravatar_id":"","url":"https://api.github.com/users/rvolosatovs","html_url":"https://github.com/rvolosatovs","followers_url":"https://api.github.com/users/rvolosatovs/followers","following_url":"https://api.github.com/users/rvolosatovs/following{/other_user}","gists_url":"https://api.github.com/users/rvolosatovs/gists{/gist_id}","starred_url":"https://api.github.com/users/rvolosatovs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvolosatovs/subscriptions","organizations_url":"https://api.github.com/users/rvolosatovs/orgs","repos_url":"https://api.github.com/users/rvolosatovs/repos","events_url":"https://api.github.com/users/rvolosatovs/events{/privacy}","received_events_url":"https://api.github.com/users/rvolosatovs/received_events","type":"User","site_admin":false},{"login":"johanstokking","id":13334001,"avatar_url":"https://avatars.githubusercontent.com/u/13334001?v=3","gravatar_id":"","url":"https://api.github.com/users/johanstokking","html_url":"https://github.com/johanstokking","followers_url":"https://api.github.com/users/johanstokking/followers","following_url":"https://api.github.com/users/johanstokking/following{/other_user}","gists_url":"https://api.github.com/users/johanstokking/gists{/gist_id}","starred_url":"https://api.github.com/users/johanstokking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanstokking/subscriptions","organizations_url":"https://api.github.com/users/johanstokking/orgs","repos_url":"https://api.github.com/users/johanstokking/repos","events_url":"https://api.github.com/users/johanstokking/events{/privacy}","received_events_url":"https://api.github.com/users/johanstokking/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/TheThingsNetwork/ttn/pulls/261/commits","review_comments_url":"https://api.github.com/repos/TheThingsNetwork/ttn/pulls/261/comments","review_comment_url":"https://api.github.com/repos/TheThingsNetwork/ttn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TheThingsNetwork/ttn/issues/261/comments","statuses_url":"https://api.github.com/repos/TheThingsNetwork/ttn/statuses/cb884722bbadc3c6f964bb65d58e770c8e7047c8","head":{"label":"rvolosatovs:noc","ref":"noc","sha":"cb884722bbadc3c6f964bb65d58e770c8e7047c8","user":{"login":"rvolosatovs","id":12877905,"avatar_url":"https://avatars.githubusercontent.com/u/12877905?v=3","gravatar_id":"","url":"https://api.github.com/users/rvolosatovs","html_url":"https://github.com/rvolosatovs","followers_url":"https://api.github.com/users/rvolosatovs/followers","following_url":"https://api.github.com/users/rvolosatovs/following{/other_user}","gists_url":"https://api.github.com/users/rvolosatovs/gists{/gist_id}","starred_url":"https://api.github.com/users/rvolosatovs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvolosatovs/subscriptions","organizations_url":"https://api.github.com/users/rvolosatovs/orgs","repos_url":"https://api.github.com/users/rvolosatovs/repos","events_url":"https://api.github.com/users/rvolosatovs/events{/privacy}","received_events_url":"https://api.github.com/users/rvolosatovs/received_events","type":"User","site_admin":false},"repo":{"id":64661648,"name":"ttn","full_name":"rvolosatovs/ttn","owner":{"login":"rvolosatovs","id":12877905,"avatar_url":"https://avatars.githubusercontent.com/u/12877905?v=3","gravatar_id":"","url":"https://api.github.com/users/rvolosatovs","html_url":"https://github.com/rvolosatovs","followers_url":"https://api.github.com/users/rvolosatovs/followers","following_url":"https://api.github.com/users/rvolosatovs/following{/other_user}","gists_url":"https://api.github.com/users/rvolosatovs/gists{/gist_id}","starred_url":"https://api.github.com/users/rvolosatovs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvolosatovs/subscriptions","organizations_url":"https://api.github.com/users/rvolosatovs/orgs","repos_url":"https://api.github.com/users/rvolosatovs/repos","events_url":"https://api.github.com/users/rvolosatovs/events{/privacy}","received_events_url":"https://api.github.com/users/rvolosatovs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rvolosatovs/ttn","description":"The Things Network is a global open crowdsourced Internet of Things data network.","fork":true,"url":"https://api.github.com/repos/rvolosatovs/ttn","forks_url":"https://api.github.com/repos/rvolosatovs/ttn/forks","keys_url":"https://api.github.com/repos/rvolosatovs/ttn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rvolosatovs/ttn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rvolosatovs/ttn/teams","hooks_url":"https://api.github.com/repos/rvolosatovs/ttn/hooks","issue_events_url":"https://api.github.com/repos/rvolosatovs/ttn/issues/events{/number}","events_url":"https://api.github.com/repos/rvolosatovs/ttn/events","assignees_url":"https://api.github.com/repos/rvolosatovs/ttn/assignees{/user}","branches_url":"https://api.github.com/repos/rvolosatovs/ttn/branches{/branch}","tags_url":"https://api.github.com/repos/rvolosatovs/ttn/tags","blobs_url":"https://api.github.com/repos/rvolosatovs/ttn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rvolosatovs/ttn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rvolosatovs/ttn/git/refs{/sha}","trees_url":"https://api.github.com/repos/rvolosatovs/ttn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rvolosatovs/ttn/statuses/{sha}","languages_url":"https://api.github.com/repos/rvolosatovs/ttn/languages","stargazers_url":"https://api.github.com/repos/rvolosatovs/ttn/stargazers","contributors_url":"https://api.github.com/repos/rvolosatovs/ttn/contributors","subscribers_url":"https://api.github.com/repos/rvolosatovs/ttn/subscribers","subscription_url":"https://api.github.com/repos/rvolosatovs/ttn/subscription","commits_url":"https://api.github.com/repos/rvolosatovs/ttn/commits{/sha}","git_commits_url":"https://api.github.com/repos/rvolosatovs/ttn/git/commits{/sha}","comments_url":"https://api.github.com/repos/rvolosatovs/ttn/comments{/number}","issue_comment_url":"https://api.github.com/repos/rvolosatovs/ttn/issues/comments{/number}","contents_url":"https://api.github.com/repos/rvolosatovs/ttn/contents/{+path}","compare_url":"https://api.github.com/repos/rvolosatovs/ttn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rvolosatovs/ttn/merges","archive_url":"https://api.github.com/repos/rvolosatovs/ttn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rvolosatovs/ttn/downloads","issues_url":"https://api.github.com/repos/rvolosatovs/ttn/issues{/number}","pulls_url":"https://api.github.com/repos/rvolosatovs/ttn/pulls{/number}","milestones_url":"https://api.github.com/repos/rvolosatovs/ttn/milestones{/number}","notifications_url":"https://api.github.com/repos/rvolosatovs/ttn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rvolosatovs/ttn/labels{/name}","releases_url":"https://api.github.com/repos/rvolosatovs/ttn/releases{/id}","deployments_url":"https://api.github.com/repos/rvolosatovs/ttn/deployments","created_at":"2016-08-01T11:31:23Z","updated_at":"2016-08-01T11:31:24Z","pushed_at":"2016-09-19T19:36:55Z","git_url":"git://github.com/rvolosatovs/ttn.git","ssh_url":"git@github.com:rvolosatovs/ttn.git","clone_url":"https://github.com/rvolosatovs/ttn.git","svn_url":"https://github.com/rvolosatovs/ttn","homepage":"http://thethingsnetwork.org","size":3734,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"TheThingsNetwork:refactor","ref":"refactor","sha":"282395a95f0d855afa0a498a4d17beebd66f7ad4","user":{"login":"TheThingsNetwork","id":13333576,"avatar_url":"https://avatars.githubusercontent.com/u/13333576?v=3","gravatar_id":"","url":"https://api.github.com/users/TheThingsNetwork","html_url":"https://github.com/TheThingsNetwork","followers_url":"https://api.github.com/users/TheThingsNetwork/followers","following_url":"https://api.github.com/users/TheThingsNetwork/following{/other_user}","gists_url":"https://api.github.com/users/TheThingsNetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/TheThingsNetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheThingsNetwork/subscriptions","organizations_url":"https://api.github.com/users/TheThingsNetwork/orgs","repos_url":"https://api.github.com/users/TheThingsNetwork/repos","events_url":"https://api.github.com/users/TheThingsNetwork/events{/privacy}","received_events_url":"https://api.github.com/users/TheThingsNetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":47138513,"name":"ttn","full_name":"TheThingsNetwork/ttn","owner":{"login":"TheThingsNetwork","id":13333576,"avatar_url":"https://avatars.githubusercontent.com/u/13333576?v=3","gravatar_id":"","url":"https://api.github.com/users/TheThingsNetwork","html_url":"https://github.com/TheThingsNetwork","followers_url":"https://api.github.com/users/TheThingsNetwork/followers","following_url":"https://api.github.com/users/TheThingsNetwork/following{/other_user}","gists_url":"https://api.github.com/users/TheThingsNetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/TheThingsNetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheThingsNetwork/subscriptions","organizations_url":"https://api.github.com/users/TheThingsNetwork/orgs","repos_url":"https://api.github.com/users/TheThingsNetwork/repos","events_url":"https://api.github.com/users/TheThingsNetwork/events{/privacy}","received_events_url":"https://api.github.com/users/TheThingsNetwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TheThingsNetwork/ttn","description":"Routing Backend for The Things Network","fork":false,"url":"https://api.github.com/repos/TheThingsNetwork/ttn","forks_url":"https://api.github.com/repos/TheThingsNetwork/ttn/forks","keys_url":"https://api.github.com/repos/TheThingsNetwork/ttn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TheThingsNetwork/ttn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TheThingsNetwork/ttn/teams","hooks_url":"https://api.github.com/repos/TheThingsNetwork/ttn/hooks","issue_events_url":"https://api.github.com/repos/TheThingsNetwork/ttn/issues/events{/number}","events_url":"https://api.github.com/repos/TheThingsNetwork/ttn/events","assignees_url":"https://api.github.com/repos/TheThingsNetwork/ttn/assignees{/user}","branches_url":"https://api.github.com/repos/TheThingsNetwork/ttn/branches{/branch}","tags_url":"https://api.github.com/repos/TheThingsNetwork/ttn/tags","blobs_url":"https://api.github.com/repos/TheThingsNetwork/ttn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TheThingsNetwork/ttn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TheThingsNetwork/ttn/git/refs{/sha}","trees_url":"https://api.github.com/repos/TheThingsNetwork/ttn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TheThingsNetwork/ttn/statuses/{sha}","languages_url":"https://api.github.com/repos/TheThingsNetwork/ttn/languages","stargazers_url":"https://api.github.com/repos/TheThingsNetwork/ttn/stargazers","contributors_url":"https://api.github.com/repos/TheThingsNetwork/ttn/contributors","subscribers_url":"https://api.github.com/repos/TheThingsNetwork/ttn/subscribers","subscription_url":"https://api.github.com/repos/TheThingsNetwork/ttn/subscription","commits_url":"https://api.github.com/repos/TheThingsNetwork/ttn/commits{/sha}","git_commits_url":"https://api.github.com/repos/TheThingsNetwork/ttn/git/commits{/sha}","comments_url":"https://api.github.com/repos/TheThingsNetwork/ttn/comments{/number}","issue_comment_url":"https://api.github.com/repos/TheThingsNetwork/ttn/issues/comments{/number}","contents_url":"https://api.github.com/repos/TheThingsNetwork/ttn/contents/{+path}","compare_url":"https://api.github.com/repos/TheThingsNetwork/ttn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TheThingsNetwork/ttn/merges","archive_url":"https://api.github.com/repos/TheThingsNetwork/ttn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TheThingsNetwork/ttn/downloads","issues_url":"https://api.github.com/repos/TheThingsNetwork/ttn/issues{/number}","pulls_url":"https://api.github.com/repos/TheThingsNetwork/ttn/pulls{/number}","milestones_url":"https://api.github.com/repos/TheThingsNetwork/ttn/milestones{/number}","notifications_url":"https://api.github.com/repos/TheThingsNetwork/ttn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TheThingsNetwork/ttn/labels{/name}","releases_url":"https://api.github.com/repos/TheThingsNetwork/ttn/releases{/id}","deployments_url":"https://api.github.com/repos/TheThingsNetwork/ttn/deployments","created_at":"2015-11-30T18:41:33Z","updated_at":"2016-09-13T08:34:06Z","pushed_at":"2016-09-20T11:45:58Z","git_url":"git://github.com/TheThingsNetwork/ttn.git","ssh_url":"git@github.com:TheThingsNetwork/ttn.git","clone_url":"https://github.com/TheThingsNetwork/ttn.git","svn_url":"https://github.com/TheThingsNetwork/ttn","homepage":"http://thethingsnetwork.org","size":5383,"stargazers_count":96,"watchers_count":96,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":26,"forks":38,"open_issues":26,"watchers":96,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/TheThingsNetwork/ttn/pulls/261"},"html":{"href":"https://github.com/TheThingsNetwork/ttn/pull/261"},"issue":{"href":"https://api.github.com/repos/TheThingsNetwork/ttn/issues/261"},"comments":{"href":"https://api.github.com/repos/TheThingsNetwork/ttn/issues/261/comments"},"review_comments":{"href":"https://api.github.com/repos/TheThingsNetwork/ttn/pulls/261/comments"},"review_comment":{"href":"https://api.github.com/repos/TheThingsNetwork/ttn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TheThingsNetwork/ttn/pulls/261/commits"},"statuses":{"href":"https://api.github.com/repos/TheThingsNetwork/ttn/statuses/cb884722bbadc3c6f964bb65d58e770c8e7047c8"}}}}
{"actor":{"display_login":"htdvisser"}}