{"action":"created","comment":{"url":"https://api.github.com/repos/Financial-Times/next-myft-api/pulls/comments/51715124","id":51715124,"diff_hunk":"@@ -0,0 +1,132 @@\n+'use strict';\n+\n+const _ = require('lodash');\n+const directly = require('directly');\n+const tap = require('./tap');\n+const FlagClearer = require('./flag-clearer');\n+const db = require('../utils/db');","path":"jobs/lib/all-users-query.js","position":7,"original_position":7,"commit_id":"0d8fa11b12208aee2d5f8f6b771361012c14f019","original_commit_id":"0d8fa11b12208aee2d5f8f6b771361012c14f019","user":{"login":"phamann","id":80089,"avatar_url":"https://avatars.githubusercontent.com/u/80089?v=3","gravatar_id":"","url":"https://api.github.com/users/phamann","html_url":"https://github.com/phamann","followers_url":"https://api.github.com/users/phamann/followers","following_url":"https://api.github.com/users/phamann/following{/other_user}","gists_url":"https://api.github.com/users/phamann/gists{/gist_id}","starred_url":"https://api.github.com/users/phamann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phamann/subscriptions","organizations_url":"https://api.github.com/users/phamann/orgs","repos_url":"https://api.github.com/users/phamann/repos","events_url":"https://api.github.com/users/phamann/events{/privacy}","received_events_url":"https://api.github.com/users/phamann/received_events","type":"User","site_admin":false},"body":"By using this you are constrained to our production API limitations, such as a max socket pool and a timeout of 3secs. The later could cause queries to fail if running expensive queries. I've tended to not use the normal connection inside jobs for these reasons.","created_at":"2016-02-03T12:39:25Z","updated_at":"2016-02-03T12:39:25Z","html_url":"https://github.com/Financial-Times/next-myft-api/pull/166#discussion_r51715124","pull_request_url":"https://api.github.com/repos/Financial-Times/next-myft-api/pulls/166","_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/next-myft-api/pulls/comments/51715124"},"html":{"href":"https://github.com/Financial-Times/next-myft-api/pull/166#discussion_r51715124"},"pull_request":{"href":"https://api.github.com/repos/Financial-Times/next-myft-api/pulls/166"}}},"pull_request":{"url":"https://api.github.com/repos/Financial-Times/next-myft-api/pulls/166","id":58130693,"html_url":"https://github.com/Financial-Times/next-myft-api/pull/166","diff_url":"https://github.com/Financial-Times/next-myft-api/pull/166.diff","patch_url":"https://github.com/Financial-Times/next-myft-api/pull/166.patch","issue_url":"https://api.github.com/repos/Financial-Times/next-myft-api/issues/166","number":166,"state":"open","locked":false,"title":"Get myft engagement job","user":{"login":"laurieboyes","id":4622378,"avatar_url":"https://avatars.githubusercontent.com/u/4622378?v=3","gravatar_id":"","url":"https://api.github.com/users/laurieboyes","html_url":"https://github.com/laurieboyes","followers_url":"https://api.github.com/users/laurieboyes/followers","following_url":"https://api.github.com/users/laurieboyes/following{/other_user}","gists_url":"https://api.github.com/users/laurieboyes/gists{/gist_id}","starred_url":"https://api.github.com/users/laurieboyes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurieboyes/subscriptions","organizations_url":"https://api.github.com/users/laurieboyes/orgs","repos_url":"https://api.github.com/users/laurieboyes/repos","events_url":"https://api.github.com/users/laurieboyes/events{/privacy}","received_events_url":"https://api.github.com/users/laurieboyes/received_events","type":"User","site_admin":false},"body":"Get the myFT engagement data for each user and store it on s3\r\n![screen shot 2016-02-03 at 11 55 58](https://cloud.githubusercontent.com/assets/4622378/12781677/d757e440-ca6d-11e5-8e7c-ffc27bc540fb.png)\r\n\r\n\r\nTo do:\r\n- [ ] **MUST HAVE**: Rewrite `/myft-engagement` API route to get engagement from this file, rather than db\r\n- [ ] Back up engagement.json in s3 (my instinct is don't bother, but maybe others disagree?)\r\n- [ ] Refactor delete job to use `all-users-query.js`","created_at":"2016-02-03T12:31:47Z","updated_at":"2016-02-03T12:39:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e716a07058633daea809f8f7d3925c4328c60db7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Financial-Times/next-myft-api/pulls/166/commits","review_comments_url":"https://api.github.com/repos/Financial-Times/next-myft-api/pulls/166/comments","review_comment_url":"https://api.github.com/repos/Financial-Times/next-myft-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Financial-Times/next-myft-api/issues/166/comments","statuses_url":"https://api.github.com/repos/Financial-Times/next-myft-api/statuses/0d8fa11b12208aee2d5f8f6b771361012c14f019","head":{"label":"Financial-Times:get-myft-engagement-job","ref":"get-myft-engagement-job","sha":"0d8fa11b12208aee2d5f8f6b771361012c14f019","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":40488712,"name":"next-myft-api","full_name":"Financial-Times/next-myft-api","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/next-myft-api","description":"API to read/write data concerning all myFT functionality on next.ft.com","fork":false,"url":"https://api.github.com/repos/Financial-Times/next-myft-api","forks_url":"https://api.github.com/repos/Financial-Times/next-myft-api/forks","keys_url":"https://api.github.com/repos/Financial-Times/next-myft-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/next-myft-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/next-myft-api/teams","hooks_url":"https://api.github.com/repos/Financial-Times/next-myft-api/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/next-myft-api/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/next-myft-api/events","assignees_url":"https://api.github.com/repos/Financial-Times/next-myft-api/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/next-myft-api/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/next-myft-api/tags","blobs_url":"https://api.github.com/repos/Financial-Times/next-myft-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/next-myft-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/next-myft-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/next-myft-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/next-myft-api/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/next-myft-api/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/next-myft-api/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/next-myft-api/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/next-myft-api/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/next-myft-api/subscription","commits_url":"https://api.github.com/repos/Financial-Times/next-myft-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/next-myft-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/next-myft-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/next-myft-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/next-myft-api/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/next-myft-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/next-myft-api/merges","archive_url":"https://api.github.com/repos/Financial-Times/next-myft-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/next-myft-api/downloads","issues_url":"https://api.github.com/repos/Financial-Times/next-myft-api/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/next-myft-api/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/next-myft-api/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/next-myft-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/next-myft-api/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/next-myft-api/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/next-myft-api/deployments","created_at":"2015-08-10T15:00:26Z","updated_at":"2016-01-13T11:36:00Z","pushed_at":"2016-02-03T12:31:47Z","git_url":"git://github.com/Financial-Times/next-myft-api.git","ssh_url":"git@github.com:Financial-Times/next-myft-api.git","clone_url":"https://github.com/Financial-Times/next-myft-api.git","svn_url":"https://github.com/Financial-Times/next-myft-api","homepage":"","size":1338,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"Financial-Times:master","ref":"master","sha":"345c88384f94a9d31fe04269676bb35d457ae82d","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":40488712,"name":"next-myft-api","full_name":"Financial-Times/next-myft-api","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/next-myft-api","description":"API to read/write data concerning all myFT functionality on next.ft.com","fork":false,"url":"https://api.github.com/repos/Financial-Times/next-myft-api","forks_url":"https://api.github.com/repos/Financial-Times/next-myft-api/forks","keys_url":"https://api.github.com/repos/Financial-Times/next-myft-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/next-myft-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/next-myft-api/teams","hooks_url":"https://api.github.com/repos/Financial-Times/next-myft-api/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/next-myft-api/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/next-myft-api/events","assignees_url":"https://api.github.com/repos/Financial-Times/next-myft-api/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/next-myft-api/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/next-myft-api/tags","blobs_url":"https://api.github.com/repos/Financial-Times/next-myft-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/next-myft-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/next-myft-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/next-myft-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/next-myft-api/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/next-myft-api/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/next-myft-api/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/next-myft-api/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/next-myft-api/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/next-myft-api/subscription","commits_url":"https://api.github.com/repos/Financial-Times/next-myft-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/next-myft-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/next-myft-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/next-myft-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/next-myft-api/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/next-myft-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/next-myft-api/merges","archive_url":"https://api.github.com/repos/Financial-Times/next-myft-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/next-myft-api/downloads","issues_url":"https://api.github.com/repos/Financial-Times/next-myft-api/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/next-myft-api/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/next-myft-api/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/next-myft-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/next-myft-api/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/next-myft-api/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/next-myft-api/deployments","created_at":"2015-08-10T15:00:26Z","updated_at":"2016-01-13T11:36:00Z","pushed_at":"2016-02-03T12:31:47Z","git_url":"git://github.com/Financial-Times/next-myft-api.git","ssh_url":"git@github.com:Financial-Times/next-myft-api.git","clone_url":"https://github.com/Financial-Times/next-myft-api.git","svn_url":"https://github.com/Financial-Times/next-myft-api","homepage":"","size":1338,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/next-myft-api/pulls/166"},"html":{"href":"https://github.com/Financial-Times/next-myft-api/pull/166"},"issue":{"href":"https://api.github.com/repos/Financial-Times/next-myft-api/issues/166"},"comments":{"href":"https://api.github.com/repos/Financial-Times/next-myft-api/issues/166/comments"},"review_comments":{"href":"https://api.github.com/repos/Financial-Times/next-myft-api/pulls/166/comments"},"review_comment":{"href":"https://api.github.com/repos/Financial-Times/next-myft-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Financial-Times/next-myft-api/pulls/166/commits"},"statuses":{"href":"https://api.github.com/repos/Financial-Times/next-myft-api/statuses/0d8fa11b12208aee2d5f8f6b771361012c14f019"}}}}