{"action":"created","comment":{"url":"https://api.github.com/repos/sonm-io/core/pulls/comments/214290443","pull_request_review_id":151313968,"id":214290443,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDI5MDQ0Mw==","diff_hunk":"@@ -163,6 +163,17 @@ func (m *Scheduler) ReleaseTask(taskID string) error {\n \treturn nil\n }\n \n+func (m *Scheduler) ResourceByTask(id string) (*sonm.AskPlanResources, error) {\n+\tm.mu.Lock()\n+\tdefer m.mu.Unlock()\n+\tres, ok := m.pool.used[id]","path":"insonmnia/resource/pool.go","position":7,"original_position":7,"commit_id":"67e811002d9aeb8b935b0d54734b960cee982335","original_commit_id":"67e811002d9aeb8b935b0d54734b960cee982335","user":{"login":"antmat","id":691770,"node_id":"MDQ6VXNlcjY5MTc3MA==","avatar_url":"https://avatars3.githubusercontent.com/u/691770?v=4","gravatar_id":"","url":"https://api.github.com/users/antmat","html_url":"https://github.com/antmat","followers_url":"https://api.github.com/users/antmat/followers","following_url":"https://api.github.com/users/antmat/following{/other_user}","gists_url":"https://api.github.com/users/antmat/gists{/gist_id}","starred_url":"https://api.github.com/users/antmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antmat/subscriptions","organizations_url":"https://api.github.com/users/antmat/orgs","repos_url":"https://api.github.com/users/antmat/repos","events_url":"https://api.github.com/users/antmat/events{/privacy}","received_events_url":"https://api.github.com/users/antmat/received_events","type":"User","site_admin":false},"body":"this one is global pool for ask plans. You need to do smth like\r\n```\r\nask, ok := m.taskToAskPlan[id]\r\n//check ok\r\npool, ok := m.askPlanPools[ask.GetId()]\r\n//check ok\r\nres, ok := pool.used[id]\r\n```","created_at":"2018-08-31T09:10:52Z","updated_at":"2018-08-31T09:11:36Z","html_url":"https://github.com/sonm-io/core/pull/1368#discussion_r214290443","pull_request_url":"https://api.github.com/repos/sonm-io/core/pulls/1368","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/sonm-io/core/pulls/comments/214290443"},"html":{"href":"https://github.com/sonm-io/core/pull/1368#discussion_r214290443"},"pull_request":{"href":"https://api.github.com/repos/sonm-io/core/pulls/1368"}}},"pull_request":{"url":"https://api.github.com/repos/sonm-io/core/pulls/1368","id":212077511,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyMDc3NTEx","html_url":"https://github.com/sonm-io/core/pull/1368","diff_url":"https://github.com/sonm-io/core/pull/1368.diff","patch_url":"https://github.com/sonm-io/core/pull/1368.patch","issue_url":"https://api.github.com/repos/sonm-io/core/issues/1368","number":1368,"state":"open","locked":false,"title":"fix: show allocated resources in TaskStatus","user":{"login":"sshaman1101","id":5667740,"node_id":"MDQ6VXNlcjU2Njc3NDA=","avatar_url":"https://avatars1.githubusercontent.com/u/5667740?v=4","gravatar_id":"","url":"https://api.github.com/users/sshaman1101","html_url":"https://github.com/sshaman1101","followers_url":"https://api.github.com/users/sshaman1101/followers","following_url":"https://api.github.com/users/sshaman1101/following{/other_user}","gists_url":"https://api.github.com/users/sshaman1101/gists{/gist_id}","starred_url":"https://api.github.com/users/sshaman1101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sshaman1101/subscriptions","organizations_url":"https://api.github.com/users/sshaman1101/orgs","repos_url":"https://api.github.com/users/sshaman1101/repos","events_url":"https://api.github.com/users/sshaman1101/events{/privacy}","received_events_url":"https://api.github.com/users/sshaman1101/received_events","type":"User","site_admin":false},"body":"This commit fills the `AllocatedResources` field from the deal's ask-plan.\r\nActual resources info gives an ability to show what part of deal's resources are acquired by task, at least what GPUs is used.\r\n","created_at":"2018-08-30T13:22:50Z","updated_at":"2018-08-31T09:11:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"30e4b859d9290d0728423c3659587acd4dee1e4c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"3Hren","id":969900,"node_id":"MDQ6VXNlcjk2OTkwMA==","avatar_url":"https://avatars3.githubusercontent.com/u/969900?v=4","gravatar_id":"","url":"https://api.github.com/users/3Hren","html_url":"https://github.com/3Hren","followers_url":"https://api.github.com/users/3Hren/followers","following_url":"https://api.github.com/users/3Hren/following{/other_user}","gists_url":"https://api.github.com/users/3Hren/gists{/gist_id}","starred_url":"https://api.github.com/users/3Hren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3Hren/subscriptions","organizations_url":"https://api.github.com/users/3Hren/orgs","repos_url":"https://api.github.com/users/3Hren/repos","events_url":"https://api.github.com/users/3Hren/events{/privacy}","received_events_url":"https://api.github.com/users/3Hren/received_events","type":"User","site_admin":false},{"login":"oopcode","id":6124982,"node_id":"MDQ6VXNlcjYxMjQ5ODI=","avatar_url":"https://avatars0.githubusercontent.com/u/6124982?v=4","gravatar_id":"","url":"https://api.github.com/users/oopcode","html_url":"https://github.com/oopcode","followers_url":"https://api.github.com/users/oopcode/followers","following_url":"https://api.github.com/users/oopcode/following{/other_user}","gists_url":"https://api.github.com/users/oopcode/gists{/gist_id}","starred_url":"https://api.github.com/users/oopcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oopcode/subscriptions","organizations_url":"https://api.github.com/users/oopcode/orgs","repos_url":"https://api.github.com/users/oopcode/repos","events_url":"https://api.github.com/users/oopcode/events{/privacy}","received_events_url":"https://api.github.com/users/oopcode/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sonm-io/core/pulls/1368/commits","review_comments_url":"https://api.github.com/repos/sonm-io/core/pulls/1368/comments","review_comment_url":"https://api.github.com/repos/sonm-io/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sonm-io/core/issues/1368/comments","statuses_url":"https://api.github.com/repos/sonm-io/core/statuses/67e811002d9aeb8b935b0d54734b960cee982335","head":{"label":"sonm-io:fix/worker/fill-allocated-resources","ref":"fix/worker/fill-allocated-resources","sha":"67e811002d9aeb8b935b0d54734b960cee982335","user":{"login":"sonm-io","id":25040195,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDQwMTk1","avatar_url":"https://avatars1.githubusercontent.com/u/25040195?v=4","gravatar_id":"","url":"https://api.github.com/users/sonm-io","html_url":"https://github.com/sonm-io","followers_url":"https://api.github.com/users/sonm-io/followers","following_url":"https://api.github.com/users/sonm-io/following{/other_user}","gists_url":"https://api.github.com/users/sonm-io/gists{/gist_id}","starred_url":"https://api.github.com/users/sonm-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonm-io/subscriptions","organizations_url":"https://api.github.com/users/sonm-io/orgs","repos_url":"https://api.github.com/users/sonm-io/repos","events_url":"https://api.github.com/users/sonm-io/events{/privacy}","received_events_url":"https://api.github.com/users/sonm-io/received_events","type":"Organization","site_admin":false},"repo":{"id":98422971,"node_id":"MDEwOlJlcG9zaXRvcnk5ODQyMjk3MQ==","name":"core","full_name":"sonm-io/core","owner":{"login":"sonm-io","id":25040195,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDQwMTk1","avatar_url":"https://avatars1.githubusercontent.com/u/25040195?v=4","gravatar_id":"","url":"https://api.github.com/users/sonm-io","html_url":"https://github.com/sonm-io","followers_url":"https://api.github.com/users/sonm-io/followers","following_url":"https://api.github.com/users/sonm-io/following{/other_user}","gists_url":"https://api.github.com/users/sonm-io/gists{/gist_id}","starred_url":"https://api.github.com/users/sonm-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonm-io/subscriptions","organizations_url":"https://api.github.com/users/sonm-io/orgs","repos_url":"https://api.github.com/users/sonm-io/repos","events_url":"https://api.github.com/users/sonm-io/events{/privacy}","received_events_url":"https://api.github.com/users/sonm-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sonm-io/core","description":"Decentralized Fog Computing Platform","fork":false,"url":"https://api.github.com/repos/sonm-io/core","forks_url":"https://api.github.com/repos/sonm-io/core/forks","keys_url":"https://api.github.com/repos/sonm-io/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sonm-io/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sonm-io/core/teams","hooks_url":"https://api.github.com/repos/sonm-io/core/hooks","issue_events_url":"https://api.github.com/repos/sonm-io/core/issues/events{/number}","events_url":"https://api.github.com/repos/sonm-io/core/events","assignees_url":"https://api.github.com/repos/sonm-io/core/assignees{/user}","branches_url":"https://api.github.com/repos/sonm-io/core/branches{/branch}","tags_url":"https://api.github.com/repos/sonm-io/core/tags","blobs_url":"https://api.github.com/repos/sonm-io/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sonm-io/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sonm-io/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/sonm-io/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sonm-io/core/statuses/{sha}","languages_url":"https://api.github.com/repos/sonm-io/core/languages","stargazers_url":"https://api.github.com/repos/sonm-io/core/stargazers","contributors_url":"https://api.github.com/repos/sonm-io/core/contributors","subscribers_url":"https://api.github.com/repos/sonm-io/core/subscribers","subscription_url":"https://api.github.com/repos/sonm-io/core/subscription","commits_url":"https://api.github.com/repos/sonm-io/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/sonm-io/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/sonm-io/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/sonm-io/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/sonm-io/core/contents/{+path}","compare_url":"https://api.github.com/repos/sonm-io/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sonm-io/core/merges","archive_url":"https://api.github.com/repos/sonm-io/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sonm-io/core/downloads","issues_url":"https://api.github.com/repos/sonm-io/core/issues{/number}","pulls_url":"https://api.github.com/repos/sonm-io/core/pulls{/number}","milestones_url":"https://api.github.com/repos/sonm-io/core/milestones{/number}","notifications_url":"https://api.github.com/repos/sonm-io/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sonm-io/core/labels{/name}","releases_url":"https://api.github.com/repos/sonm-io/core/releases{/id}","deployments_url":"https://api.github.com/repos/sonm-io/core/deployments","created_at":"2017-07-26T12:57:50Z","updated_at":"2018-08-31T04:28:54Z","pushed_at":"2018-08-30T20:28:31Z","git_url":"git://github.com/sonm-io/core.git","ssh_url":"git@github.com:sonm-io/core.git","clone_url":"https://github.com/sonm-io/core.git","svn_url":"https://github.com/sonm-io/core","homepage":"https://sonm.com","size":36427,"stargazers_count":292,"watchers_count":292,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":51,"open_issues":18,"watchers":292,"default_branch":"master"}},"base":{"label":"sonm-io:master","ref":"master","sha":"70243d48cc98fb10b803205f205e2694295f5d0f","user":{"login":"sonm-io","id":25040195,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDQwMTk1","avatar_url":"https://avatars1.githubusercontent.com/u/25040195?v=4","gravatar_id":"","url":"https://api.github.com/users/sonm-io","html_url":"https://github.com/sonm-io","followers_url":"https://api.github.com/users/sonm-io/followers","following_url":"https://api.github.com/users/sonm-io/following{/other_user}","gists_url":"https://api.github.com/users/sonm-io/gists{/gist_id}","starred_url":"https://api.github.com/users/sonm-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonm-io/subscriptions","organizations_url":"https://api.github.com/users/sonm-io/orgs","repos_url":"https://api.github.com/users/sonm-io/repos","events_url":"https://api.github.com/users/sonm-io/events{/privacy}","received_events_url":"https://api.github.com/users/sonm-io/received_events","type":"Organization","site_admin":false},"repo":{"id":98422971,"node_id":"MDEwOlJlcG9zaXRvcnk5ODQyMjk3MQ==","name":"core","full_name":"sonm-io/core","owner":{"login":"sonm-io","id":25040195,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDQwMTk1","avatar_url":"https://avatars1.githubusercontent.com/u/25040195?v=4","gravatar_id":"","url":"https://api.github.com/users/sonm-io","html_url":"https://github.com/sonm-io","followers_url":"https://api.github.com/users/sonm-io/followers","following_url":"https://api.github.com/users/sonm-io/following{/other_user}","gists_url":"https://api.github.com/users/sonm-io/gists{/gist_id}","starred_url":"https://api.github.com/users/sonm-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonm-io/subscriptions","organizations_url":"https://api.github.com/users/sonm-io/orgs","repos_url":"https://api.github.com/users/sonm-io/repos","events_url":"https://api.github.com/users/sonm-io/events{/privacy}","received_events_url":"https://api.github.com/users/sonm-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sonm-io/core","description":"Decentralized Fog Computing Platform","fork":false,"url":"https://api.github.com/repos/sonm-io/core","forks_url":"https://api.github.com/repos/sonm-io/core/forks","keys_url":"https://api.github.com/repos/sonm-io/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sonm-io/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sonm-io/core/teams","hooks_url":"https://api.github.com/repos/sonm-io/core/hooks","issue_events_url":"https://api.github.com/repos/sonm-io/core/issues/events{/number}","events_url":"https://api.github.com/repos/sonm-io/core/events","assignees_url":"https://api.github.com/repos/sonm-io/core/assignees{/user}","branches_url":"https://api.github.com/repos/sonm-io/core/branches{/branch}","tags_url":"https://api.github.com/repos/sonm-io/core/tags","blobs_url":"https://api.github.com/repos/sonm-io/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sonm-io/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sonm-io/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/sonm-io/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sonm-io/core/statuses/{sha}","languages_url":"https://api.github.com/repos/sonm-io/core/languages","stargazers_url":"https://api.github.com/repos/sonm-io/core/stargazers","contributors_url":"https://api.github.com/repos/sonm-io/core/contributors","subscribers_url":"https://api.github.com/repos/sonm-io/core/subscribers","subscription_url":"https://api.github.com/repos/sonm-io/core/subscription","commits_url":"https://api.github.com/repos/sonm-io/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/sonm-io/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/sonm-io/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/sonm-io/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/sonm-io/core/contents/{+path}","compare_url":"https://api.github.com/repos/sonm-io/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sonm-io/core/merges","archive_url":"https://api.github.com/repos/sonm-io/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sonm-io/core/downloads","issues_url":"https://api.github.com/repos/sonm-io/core/issues{/number}","pulls_url":"https://api.github.com/repos/sonm-io/core/pulls{/number}","milestones_url":"https://api.github.com/repos/sonm-io/core/milestones{/number}","notifications_url":"https://api.github.com/repos/sonm-io/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sonm-io/core/labels{/name}","releases_url":"https://api.github.com/repos/sonm-io/core/releases{/id}","deployments_url":"https://api.github.com/repos/sonm-io/core/deployments","created_at":"2017-07-26T12:57:50Z","updated_at":"2018-08-31T04:28:54Z","pushed_at":"2018-08-30T20:28:31Z","git_url":"git://github.com/sonm-io/core.git","ssh_url":"git@github.com:sonm-io/core.git","clone_url":"https://github.com/sonm-io/core.git","svn_url":"https://github.com/sonm-io/core","homepage":"https://sonm.com","size":36427,"stargazers_count":292,"watchers_count":292,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":51,"open_issues":18,"watchers":292,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sonm-io/core/pulls/1368"},"html":{"href":"https://github.com/sonm-io/core/pull/1368"},"issue":{"href":"https://api.github.com/repos/sonm-io/core/issues/1368"},"comments":{"href":"https://api.github.com/repos/sonm-io/core/issues/1368/comments"},"review_comments":{"href":"https://api.github.com/repos/sonm-io/core/pulls/1368/comments"},"review_comment":{"href":"https://api.github.com/repos/sonm-io/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sonm-io/core/pulls/1368/commits"},"statuses":{"href":"https://api.github.com/repos/sonm-io/core/statuses/67e811002d9aeb8b935b0d54734b960cee982335"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"antmat"}}