{"action":"created","comment":{"url":"https://api.github.com/repos/yandex/mastermind/pulls/comments/91733190","pull_request_review_id":12244553,"id":91733190,"diff_hunk":"@@ -73,12 +78,88 @@ def __init__(self, db, niu, job_processor, namespaces_settings):\n                     self._couple_defrag\n                 )\n \n+            if self.params.get('ttl_cleanup', {}).get('enabled', False):\n+                self.__tq.add_task_at(\n+                    self.TTL_CLEANUP,\n+                    self.ttl_cleanup_timer.next(),\n+                    self._ttl_cleanup_planner\n+                )\n+\n     def _start_tq(self):\n         self.__tq.start()\n \n     def add_planner(self, planner):\n         planner.schedule_tasks(self.__tq)\n \n+    def _get_yt_stat(self):\n+        \"\"\"\n+        Extract statistics from YT logs\n+        :param: couples with expired data size > expired_threshold are recommended to be cleaned\n+        :return: list of couples with expired records volume above specified","path":"src/cocaine-app/planner/__init__.py","position":52,"original_position":52,"commit_id":"e8a3c836b3d2e753cccd6326c8c4cb9f48cec5ba","original_commit_id":"e8a3c836b3d2e753cccd6326c8c4cb9f48cec5ba","user":{"login":"nobodyisme","id":432845,"avatar_url":"https://avatars.githubusercontent.com/u/432845?v=3","gravatar_id":"","url":"https://api.github.com/users/nobodyisme","html_url":"https://github.com/nobodyisme","followers_url":"https://api.github.com/users/nobodyisme/followers","following_url":"https://api.github.com/users/nobodyisme/following{/other_user}","gists_url":"https://api.github.com/users/nobodyisme/gists{/gist_id}","starred_url":"https://api.github.com/users/nobodyisme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nobodyisme/subscriptions","organizations_url":"https://api.github.com/users/nobodyisme/orgs","repos_url":"https://api.github.com/users/nobodyisme/repos","events_url":"https://api.github.com/users/nobodyisme/events{/privacy}","received_events_url":"https://api.github.com/users/nobodyisme/received_events","type":"User","site_admin":false},"body":"`list of couples` -> `list of couple ids`","created_at":"2016-12-09T15:15:10Z","updated_at":"2016-12-09T15:15:10Z","html_url":"https://github.com/yandex/mastermind/pull/311#discussion_r91733190","pull_request_url":"https://api.github.com/repos/yandex/mastermind/pulls/311","_links":{"self":{"href":"https://api.github.com/repos/yandex/mastermind/pulls/comments/91733190"},"html":{"href":"https://github.com/yandex/mastermind/pull/311#discussion_r91733190"},"pull_request":{"href":"https://api.github.com/repos/yandex/mastermind/pulls/311"}}},"pull_request":{"url":"https://api.github.com/repos/yandex/mastermind/pulls/311","id":94003498,"html_url":"https://github.com/yandex/mastermind/pull/311","diff_url":"https://github.com/yandex/mastermind/pull/311.diff","patch_url":"https://github.com/yandex/mastermind/pull/311.patch","issue_url":"https://api.github.com/repos/yandex/mastermind/issues/311","number":311,"state":"open","locked":false,"title":"TTL cleanup scheduler. v0.1","user":{"login":"annamel","id":11502005,"avatar_url":"https://avatars.githubusercontent.com/u/11502005?v=3","gravatar_id":"","url":"https://api.github.com/users/annamel","html_url":"https://github.com/annamel","followers_url":"https://api.github.com/users/annamel/followers","following_url":"https://api.github.com/users/annamel/following{/other_user}","gists_url":"https://api.github.com/users/annamel/gists{/gist_id}","starred_url":"https://api.github.com/users/annamel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annamel/subscriptions","organizations_url":"https://api.github.com/users/annamel/orgs","repos_url":"https://api.github.com/users/annamel/repos","events_url":"https://api.github.com/users/annamel/events{/privacy}","received_events_url":"https://api.github.com/users/annamel/received_events","type":"User","site_admin":false},"body":"The first approximation of ttl cleanup scheduler. It starts periodically, aggregates data from stat_box of the previous day into YT sub-table. And then based on YT sub-table information and configuration settings, makes a decision whether it worth running mds_cleanup service.\r\n\r\nThe current solution doesn't analyze the history of runs. And it doesn't take into account inter-crossing between ttl_cleanup on the same HDD. These features are coming","created_at":"2016-11-16T16:43:42Z","updated_at":"2016-12-09T15:15:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"235966071a55a26b9301d9689c7d9ce1009a2167","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/yandex/mastermind/pulls/311/commits","review_comments_url":"https://api.github.com/repos/yandex/mastermind/pulls/311/comments","review_comment_url":"https://api.github.com/repos/yandex/mastermind/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yandex/mastermind/issues/311/comments","statuses_url":"https://api.github.com/repos/yandex/mastermind/statuses/e8a3c836b3d2e753cccd6326c8c4cb9f48cec5ba","head":{"label":"annamel:ttl_cleanup_sched","ref":"ttl_cleanup_sched","sha":"e8a3c836b3d2e753cccd6326c8c4cb9f48cec5ba","user":{"login":"annamel","id":11502005,"avatar_url":"https://avatars.githubusercontent.com/u/11502005?v=3","gravatar_id":"","url":"https://api.github.com/users/annamel","html_url":"https://github.com/annamel","followers_url":"https://api.github.com/users/annamel/followers","following_url":"https://api.github.com/users/annamel/following{/other_user}","gists_url":"https://api.github.com/users/annamel/gists{/gist_id}","starred_url":"https://api.github.com/users/annamel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annamel/subscriptions","organizations_url":"https://api.github.com/users/annamel/orgs","repos_url":"https://api.github.com/users/annamel/repos","events_url":"https://api.github.com/users/annamel/events{/privacy}","received_events_url":"https://api.github.com/users/annamel/received_events","type":"User","site_admin":false},"repo":{"id":66254618,"name":"mastermind","full_name":"annamel/mastermind","owner":{"login":"annamel","id":11502005,"avatar_url":"https://avatars.githubusercontent.com/u/11502005?v=3","gravatar_id":"","url":"https://api.github.com/users/annamel","html_url":"https://github.com/annamel","followers_url":"https://api.github.com/users/annamel/followers","following_url":"https://api.github.com/users/annamel/following{/other_user}","gists_url":"https://api.github.com/users/annamel/gists{/gist_id}","starred_url":"https://api.github.com/users/annamel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annamel/subscriptions","organizations_url":"https://api.github.com/users/annamel/orgs","repos_url":"https://api.github.com/users/annamel/repos","events_url":"https://api.github.com/users/annamel/events{/privacy}","received_events_url":"https://api.github.com/users/annamel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/annamel/mastermind","description":"Smart control for a big storage","fork":true,"url":"https://api.github.com/repos/annamel/mastermind","forks_url":"https://api.github.com/repos/annamel/mastermind/forks","keys_url":"https://api.github.com/repos/annamel/mastermind/keys{/key_id}","collaborators_url":"https://api.github.com/repos/annamel/mastermind/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/annamel/mastermind/teams","hooks_url":"https://api.github.com/repos/annamel/mastermind/hooks","issue_events_url":"https://api.github.com/repos/annamel/mastermind/issues/events{/number}","events_url":"https://api.github.com/repos/annamel/mastermind/events","assignees_url":"https://api.github.com/repos/annamel/mastermind/assignees{/user}","branches_url":"https://api.github.com/repos/annamel/mastermind/branches{/branch}","tags_url":"https://api.github.com/repos/annamel/mastermind/tags","blobs_url":"https://api.github.com/repos/annamel/mastermind/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/annamel/mastermind/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/annamel/mastermind/git/refs{/sha}","trees_url":"https://api.github.com/repos/annamel/mastermind/git/trees{/sha}","statuses_url":"https://api.github.com/repos/annamel/mastermind/statuses/{sha}","languages_url":"https://api.github.com/repos/annamel/mastermind/languages","stargazers_url":"https://api.github.com/repos/annamel/mastermind/stargazers","contributors_url":"https://api.github.com/repos/annamel/mastermind/contributors","subscribers_url":"https://api.github.com/repos/annamel/mastermind/subscribers","subscription_url":"https://api.github.com/repos/annamel/mastermind/subscription","commits_url":"https://api.github.com/repos/annamel/mastermind/commits{/sha}","git_commits_url":"https://api.github.com/repos/annamel/mastermind/git/commits{/sha}","comments_url":"https://api.github.com/repos/annamel/mastermind/comments{/number}","issue_comment_url":"https://api.github.com/repos/annamel/mastermind/issues/comments{/number}","contents_url":"https://api.github.com/repos/annamel/mastermind/contents/{+path}","compare_url":"https://api.github.com/repos/annamel/mastermind/compare/{base}...{head}","merges_url":"https://api.github.com/repos/annamel/mastermind/merges","archive_url":"https://api.github.com/repos/annamel/mastermind/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/annamel/mastermind/downloads","issues_url":"https://api.github.com/repos/annamel/mastermind/issues{/number}","pulls_url":"https://api.github.com/repos/annamel/mastermind/pulls{/number}","milestones_url":"https://api.github.com/repos/annamel/mastermind/milestones{/number}","notifications_url":"https://api.github.com/repos/annamel/mastermind/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/annamel/mastermind/labels{/name}","releases_url":"https://api.github.com/repos/annamel/mastermind/releases{/id}","deployments_url":"https://api.github.com/repos/annamel/mastermind/deployments","created_at":"2016-08-22T08:38:42Z","updated_at":"2016-08-22T08:38:45Z","pushed_at":"2016-12-09T06:31:14Z","git_url":"git://github.com/annamel/mastermind.git","ssh_url":"git@github.com:annamel/mastermind.git","clone_url":"https://github.com/annamel/mastermind.git","svn_url":"https://github.com/annamel/mastermind","homepage":"","size":7911,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"master"}},"base":{"label":"yandex:release-2.28","ref":"release-2.28","sha":"8b79d9fca03524261e195f12a767533c45be47d0","user":{"login":"yandex","id":7409213,"avatar_url":"https://avatars.githubusercontent.com/u/7409213?v=3","gravatar_id":"","url":"https://api.github.com/users/yandex","html_url":"https://github.com/yandex","followers_url":"https://api.github.com/users/yandex/followers","following_url":"https://api.github.com/users/yandex/following{/other_user}","gists_url":"https://api.github.com/users/yandex/gists{/gist_id}","starred_url":"https://api.github.com/users/yandex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yandex/subscriptions","organizations_url":"https://api.github.com/users/yandex/orgs","repos_url":"https://api.github.com/users/yandex/repos","events_url":"https://api.github.com/users/yandex/events{/privacy}","received_events_url":"https://api.github.com/users/yandex/received_events","type":"Organization","site_admin":false},"repo":{"id":23435885,"name":"mastermind","full_name":"yandex/mastermind","owner":{"login":"yandex","id":7409213,"avatar_url":"https://avatars.githubusercontent.com/u/7409213?v=3","gravatar_id":"","url":"https://api.github.com/users/yandex","html_url":"https://github.com/yandex","followers_url":"https://api.github.com/users/yandex/followers","following_url":"https://api.github.com/users/yandex/following{/other_user}","gists_url":"https://api.github.com/users/yandex/gists{/gist_id}","starred_url":"https://api.github.com/users/yandex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yandex/subscriptions","organizations_url":"https://api.github.com/users/yandex/orgs","repos_url":"https://api.github.com/users/yandex/repos","events_url":"https://api.github.com/users/yandex/events{/privacy}","received_events_url":"https://api.github.com/users/yandex/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yandex/mastermind","description":"Smart control for a big storage","fork":false,"url":"https://api.github.com/repos/yandex/mastermind","forks_url":"https://api.github.com/repos/yandex/mastermind/forks","keys_url":"https://api.github.com/repos/yandex/mastermind/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yandex/mastermind/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yandex/mastermind/teams","hooks_url":"https://api.github.com/repos/yandex/mastermind/hooks","issue_events_url":"https://api.github.com/repos/yandex/mastermind/issues/events{/number}","events_url":"https://api.github.com/repos/yandex/mastermind/events","assignees_url":"https://api.github.com/repos/yandex/mastermind/assignees{/user}","branches_url":"https://api.github.com/repos/yandex/mastermind/branches{/branch}","tags_url":"https://api.github.com/repos/yandex/mastermind/tags","blobs_url":"https://api.github.com/repos/yandex/mastermind/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yandex/mastermind/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yandex/mastermind/git/refs{/sha}","trees_url":"https://api.github.com/repos/yandex/mastermind/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yandex/mastermind/statuses/{sha}","languages_url":"https://api.github.com/repos/yandex/mastermind/languages","stargazers_url":"https://api.github.com/repos/yandex/mastermind/stargazers","contributors_url":"https://api.github.com/repos/yandex/mastermind/contributors","subscribers_url":"https://api.github.com/repos/yandex/mastermind/subscribers","subscription_url":"https://api.github.com/repos/yandex/mastermind/subscription","commits_url":"https://api.github.com/repos/yandex/mastermind/commits{/sha}","git_commits_url":"https://api.github.com/repos/yandex/mastermind/git/commits{/sha}","comments_url":"https://api.github.com/repos/yandex/mastermind/comments{/number}","issue_comment_url":"https://api.github.com/repos/yandex/mastermind/issues/comments{/number}","contents_url":"https://api.github.com/repos/yandex/mastermind/contents/{+path}","compare_url":"https://api.github.com/repos/yandex/mastermind/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yandex/mastermind/merges","archive_url":"https://api.github.com/repos/yandex/mastermind/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yandex/mastermind/downloads","issues_url":"https://api.github.com/repos/yandex/mastermind/issues{/number}","pulls_url":"https://api.github.com/repos/yandex/mastermind/pulls{/number}","milestones_url":"https://api.github.com/repos/yandex/mastermind/milestones{/number}","notifications_url":"https://api.github.com/repos/yandex/mastermind/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yandex/mastermind/labels{/name}","releases_url":"https://api.github.com/repos/yandex/mastermind/releases{/id}","deployments_url":"https://api.github.com/repos/yandex/mastermind/deployments","created_at":"2014-08-28T16:57:05Z","updated_at":"2016-11-21T01:57:19Z","pushed_at":"2016-12-09T14:53:57Z","git_url":"git://github.com/yandex/mastermind.git","ssh_url":"git@github.com:yandex/mastermind.git","clone_url":"https://github.com/yandex/mastermind.git","svn_url":"https://github.com/yandex/mastermind","homepage":"","size":8419,"stargazers_count":10,"watchers_count":10,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":26,"forks":14,"open_issues":26,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yandex/mastermind/pulls/311"},"html":{"href":"https://github.com/yandex/mastermind/pull/311"},"issue":{"href":"https://api.github.com/repos/yandex/mastermind/issues/311"},"comments":{"href":"https://api.github.com/repos/yandex/mastermind/issues/311/comments"},"review_comments":{"href":"https://api.github.com/repos/yandex/mastermind/pulls/311/comments"},"review_comment":{"href":"https://api.github.com/repos/yandex/mastermind/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yandex/mastermind/pulls/311/commits"},"statuses":{"href":"https://api.github.com/repos/yandex/mastermind/statuses/e8a3c836b3d2e753cccd6326c8c4cb9f48cec5ba"}}}}
{"actor":{"display_login":"nobodyisme"}}