{"action":"created","comment":{"url":"https://api.github.com/repos/coinfi/coinfi/pulls/comments/222878298","pull_request_review_id":161873085,"id":222878298,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjg3ODI5OA==","diff_hunk":"@@ -0,0 +1,138 @@\n+require 'net/http'\n+require 'uri'\n+\n+namespace :etldb do\n+    db_name = ENV['ETL_DB_NAME']\n+    db_port = ENV['ETL_DB_PORT']\n+    db_host = ENV['ETL_DB_HOST']\n+    db_user = ENV['ETL_DB_USER']\n+    db_pass = ENV['ETL_DB_PASSWORD']\n+\n+    tables = [\n+        {\n+            'title' => \"Daily\",\n+            'name' => \"daily_ohcl_prices\",\n+            'interval' => \"''1 day''\",\n+            'url' => \"https://hc-ping.com/772bacf5-958e-4541-b8ca-a81fe24c63d0\"\n+        },\n+        {\n+            'title' => \"Hourly\",\n+            'name' => \"hourly_ohcl_prices\",\n+            'interval' => \"''1 hour''\",\n+            'url' => \"https://hc-ping.com/c49dcf87-c6e5-4881-95f8-3bfad31d33ff\"\n+        }\n+    ]\n+\n+    coins = [\n+        {\n+            'title' => \"'Bitcoin\",\n+            'query' => lambda { Coin.where(symbol: 'BTC').pluck(:coin_key, :ranking) },\n+            'url' => \"https://hc-ping.com/67fffb49-c4d7-4e3f-a7cf-4688495c00d1\"\n+        },\n+        {\n+            'title' => \"Ethereum\",\n+            'query' => lambda { Coin.where(symbol: 'ETH').pluck(:coin_key, :ranking) },\n+            'url' => \"https://hc-ping.com/67fffb49-c4d7-4e3f-a7cf-4688495c00d1\"\n+        },\n+        {\n+            'title' => \"CoinFi\",\n+            'query' => lambda { Coin.where(symbol: 'COFI').pluck(:coin_key, :ranking) },\n+            'url' => \"https://hc-ping.com/67fffb49-c4d7-4e3f-a7cf-4688495c00d1\"\n+        },\n+        {\n+            'title' => \"Top 10\",\n+            'query' => lambda { Coin.top(10).pluck(:coin_key, :ranking) },\n+            'url' => \"https://hc-ping.com/67fffb49-c4d7-4e3f-a7cf-4688495c00d1\"\n+        },\n+        {\n+            'title' => \"Random 3\",\n+            'query' => lambda { Coin.where(\"ico_status=? OR ranking IS NOT NULL\", 'listed')","path":"lib/tasks/etl_db_check.rake","position":49,"original_position":49,"commit_id":"d9ec16c2ba6c538301889d0ba40c3afce2cd249f","original_commit_id":"d9ec16c2ba6c538301889d0ba40c3afce2cd249f","user":{"login":"hanchang","id":637370,"node_id":"MDQ6VXNlcjYzNzM3MA==","avatar_url":"https://avatars1.githubusercontent.com/u/637370?v=4","gravatar_id":"","url":"https://api.github.com/users/hanchang","html_url":"https://github.com/hanchang","followers_url":"https://api.github.com/users/hanchang/followers","following_url":"https://api.github.com/users/hanchang/following{/other_user}","gists_url":"https://api.github.com/users/hanchang/gists{/gist_id}","starred_url":"https://api.github.com/users/hanchang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanchang/subscriptions","organizations_url":"https://api.github.com/users/hanchang/orgs","repos_url":"https://api.github.com/users/hanchang/repos","events_url":"https://api.github.com/users/hanchang/events{/privacy}","received_events_url":"https://api.github.com/users/hanchang/received_events","type":"User","site_admin":false},"body":"@anthotsang Actually this can probably just be `Coin.listed` since there's some metaprogramming in the `coin.rb` model that enabled this. The `ranking` is associated with CMC instead of CC which is where our data comes from so the `listed` scope is probably a better reflection of the data, apologies for the waffling!","created_at":"2018-10-05T02:29:45Z","updated_at":"2018-10-05T02:29:45Z","html_url":"https://github.com/coinfi/coinfi/pull/463#discussion_r222878298","pull_request_url":"https://api.github.com/repos/coinfi/coinfi/pulls/463","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/coinfi/coinfi/pulls/comments/222878298"},"html":{"href":"https://github.com/coinfi/coinfi/pull/463#discussion_r222878298"},"pull_request":{"href":"https://api.github.com/repos/coinfi/coinfi/pulls/463"}}},"pull_request":{"url":"https://api.github.com/repos/coinfi/coinfi/pulls/463","id":220328569,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwMzI4NTY5","html_url":"https://github.com/coinfi/coinfi/pull/463","diff_url":"https://github.com/coinfi/coinfi/pull/463.diff","patch_url":"https://github.com/coinfi/coinfi/pull/463.patch","issue_url":"https://api.github.com/repos/coinfi/coinfi/issues/463","number":463,"state":"open","locked":false,"title":"Setup alerting to detect stale values on daily, hourly, minutely price + volume ingest","user":{"login":"anthotsang","id":929793,"node_id":"MDQ6VXNlcjkyOTc5Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/929793?v=4","gravatar_id":"","url":"https://api.github.com/users/anthotsang","html_url":"https://github.com/anthotsang","followers_url":"https://api.github.com/users/anthotsang/followers","following_url":"https://api.github.com/users/anthotsang/following{/other_user}","gists_url":"https://api.github.com/users/anthotsang/gists{/gist_id}","starred_url":"https://api.github.com/users/anthotsang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthotsang/subscriptions","organizations_url":"https://api.github.com/users/anthotsang/orgs","repos_url":"https://api.github.com/users/anthotsang/repos","events_url":"https://api.github.com/users/anthotsang/events{/privacy}","received_events_url":"https://api.github.com/users/anthotsang/received_events","type":"User","site_admin":false},"body":"https://app.asana.com/0/683768070860536/843681325340141\r\n\r\nShould be done but dblink step suddenly stopped providing results. Haven't been able to verify my volume logic.","created_at":"2018-10-04T10:39:47Z","updated_at":"2018-10-05T02:29:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d3e61ed50f6d667431d0b600ab1dc7135509135","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/coinfi/coinfi/pulls/463/commits","review_comments_url":"https://api.github.com/repos/coinfi/coinfi/pulls/463/comments","review_comment_url":"https://api.github.com/repos/coinfi/coinfi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coinfi/coinfi/issues/463/comments","statuses_url":"https://api.github.com/repos/coinfi/coinfi/statuses/d9ec16c2ba6c538301889d0ba40c3afce2cd249f","head":{"label":"coinfi:feature/check-etl-db/843681325340141","ref":"feature/check-etl-db/843681325340141","sha":"d9ec16c2ba6c538301889d0ba40c3afce2cd249f","user":{"login":"coinfi","id":31571310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNTcxMzEw","avatar_url":"https://avatars3.githubusercontent.com/u/31571310?v=4","gravatar_id":"","url":"https://api.github.com/users/coinfi","html_url":"https://github.com/coinfi","followers_url":"https://api.github.com/users/coinfi/followers","following_url":"https://api.github.com/users/coinfi/following{/other_user}","gists_url":"https://api.github.com/users/coinfi/gists{/gist_id}","starred_url":"https://api.github.com/users/coinfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coinfi/subscriptions","organizations_url":"https://api.github.com/users/coinfi/orgs","repos_url":"https://api.github.com/users/coinfi/repos","events_url":"https://api.github.com/users/coinfi/events{/privacy}","received_events_url":"https://api.github.com/users/coinfi/received_events","type":"Organization","site_admin":false},"repo":{"id":102046959,"node_id":"MDEwOlJlcG9zaXRvcnkxMDIwNDY5NTk=","name":"coinfi","full_name":"coinfi/coinfi","private":false,"owner":{"login":"coinfi","id":31571310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNTcxMzEw","avatar_url":"https://avatars3.githubusercontent.com/u/31571310?v=4","gravatar_id":"","url":"https://api.github.com/users/coinfi","html_url":"https://github.com/coinfi","followers_url":"https://api.github.com/users/coinfi/followers","following_url":"https://api.github.com/users/coinfi/following{/other_user}","gists_url":"https://api.github.com/users/coinfi/gists{/gist_id}","starred_url":"https://api.github.com/users/coinfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coinfi/subscriptions","organizations_url":"https://api.github.com/users/coinfi/orgs","repos_url":"https://api.github.com/users/coinfi/repos","events_url":"https://api.github.com/users/coinfi/events{/privacy}","received_events_url":"https://api.github.com/users/coinfi/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/coinfi/coinfi","description":"CoinFi is the cryptocurrency market intelligence platform.","fork":false,"url":"https://api.github.com/repos/coinfi/coinfi","forks_url":"https://api.github.com/repos/coinfi/coinfi/forks","keys_url":"https://api.github.com/repos/coinfi/coinfi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coinfi/coinfi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coinfi/coinfi/teams","hooks_url":"https://api.github.com/repos/coinfi/coinfi/hooks","issue_events_url":"https://api.github.com/repos/coinfi/coinfi/issues/events{/number}","events_url":"https://api.github.com/repos/coinfi/coinfi/events","assignees_url":"https://api.github.com/repos/coinfi/coinfi/assignees{/user}","branches_url":"https://api.github.com/repos/coinfi/coinfi/branches{/branch}","tags_url":"https://api.github.com/repos/coinfi/coinfi/tags","blobs_url":"https://api.github.com/repos/coinfi/coinfi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coinfi/coinfi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coinfi/coinfi/git/refs{/sha}","trees_url":"https://api.github.com/repos/coinfi/coinfi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coinfi/coinfi/statuses/{sha}","languages_url":"https://api.github.com/repos/coinfi/coinfi/languages","stargazers_url":"https://api.github.com/repos/coinfi/coinfi/stargazers","contributors_url":"https://api.github.com/repos/coinfi/coinfi/contributors","subscribers_url":"https://api.github.com/repos/coinfi/coinfi/subscribers","subscription_url":"https://api.github.com/repos/coinfi/coinfi/subscription","commits_url":"https://api.github.com/repos/coinfi/coinfi/commits{/sha}","git_commits_url":"https://api.github.com/repos/coinfi/coinfi/git/commits{/sha}","comments_url":"https://api.github.com/repos/coinfi/coinfi/comments{/number}","issue_comment_url":"https://api.github.com/repos/coinfi/coinfi/issues/comments{/number}","contents_url":"https://api.github.com/repos/coinfi/coinfi/contents/{+path}","compare_url":"https://api.github.com/repos/coinfi/coinfi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coinfi/coinfi/merges","archive_url":"https://api.github.com/repos/coinfi/coinfi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coinfi/coinfi/downloads","issues_url":"https://api.github.com/repos/coinfi/coinfi/issues{/number}","pulls_url":"https://api.github.com/repos/coinfi/coinfi/pulls{/number}","milestones_url":"https://api.github.com/repos/coinfi/coinfi/milestones{/number}","notifications_url":"https://api.github.com/repos/coinfi/coinfi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coinfi/coinfi/labels{/name}","releases_url":"https://api.github.com/repos/coinfi/coinfi/releases{/id}","deployments_url":"https://api.github.com/repos/coinfi/coinfi/deployments","created_at":"2017-08-31T21:28:02Z","updated_at":"2018-10-04T05:41:25Z","pushed_at":"2018-10-05T02:21:51Z","git_url":"git://github.com/coinfi/coinfi.git","ssh_url":"git@github.com:coinfi/coinfi.git","clone_url":"https://github.com/coinfi/coinfi.git","svn_url":"https://github.com/coinfi/coinfi","homepage":"https://www.coinfi.com","size":129828,"stargazers_count":48,"watchers_count":48,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":15,"license":null,"forks":15,"open_issues":15,"watchers":48,"default_branch":"develop"}},"base":{"label":"coinfi:develop","ref":"develop","sha":"8291ecc719952fc6f4ffb5726f12840e5e93f63c","user":{"login":"coinfi","id":31571310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNTcxMzEw","avatar_url":"https://avatars3.githubusercontent.com/u/31571310?v=4","gravatar_id":"","url":"https://api.github.com/users/coinfi","html_url":"https://github.com/coinfi","followers_url":"https://api.github.com/users/coinfi/followers","following_url":"https://api.github.com/users/coinfi/following{/other_user}","gists_url":"https://api.github.com/users/coinfi/gists{/gist_id}","starred_url":"https://api.github.com/users/coinfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coinfi/subscriptions","organizations_url":"https://api.github.com/users/coinfi/orgs","repos_url":"https://api.github.com/users/coinfi/repos","events_url":"https://api.github.com/users/coinfi/events{/privacy}","received_events_url":"https://api.github.com/users/coinfi/received_events","type":"Organization","site_admin":false},"repo":{"id":102046959,"node_id":"MDEwOlJlcG9zaXRvcnkxMDIwNDY5NTk=","name":"coinfi","full_name":"coinfi/coinfi","private":false,"owner":{"login":"coinfi","id":31571310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNTcxMzEw","avatar_url":"https://avatars3.githubusercontent.com/u/31571310?v=4","gravatar_id":"","url":"https://api.github.com/users/coinfi","html_url":"https://github.com/coinfi","followers_url":"https://api.github.com/users/coinfi/followers","following_url":"https://api.github.com/users/coinfi/following{/other_user}","gists_url":"https://api.github.com/users/coinfi/gists{/gist_id}","starred_url":"https://api.github.com/users/coinfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coinfi/subscriptions","organizations_url":"https://api.github.com/users/coinfi/orgs","repos_url":"https://api.github.com/users/coinfi/repos","events_url":"https://api.github.com/users/coinfi/events{/privacy}","received_events_url":"https://api.github.com/users/coinfi/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/coinfi/coinfi","description":"CoinFi is the cryptocurrency market intelligence platform.","fork":false,"url":"https://api.github.com/repos/coinfi/coinfi","forks_url":"https://api.github.com/repos/coinfi/coinfi/forks","keys_url":"https://api.github.com/repos/coinfi/coinfi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coinfi/coinfi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coinfi/coinfi/teams","hooks_url":"https://api.github.com/repos/coinfi/coinfi/hooks","issue_events_url":"https://api.github.com/repos/coinfi/coinfi/issues/events{/number}","events_url":"https://api.github.com/repos/coinfi/coinfi/events","assignees_url":"https://api.github.com/repos/coinfi/coinfi/assignees{/user}","branches_url":"https://api.github.com/repos/coinfi/coinfi/branches{/branch}","tags_url":"https://api.github.com/repos/coinfi/coinfi/tags","blobs_url":"https://api.github.com/repos/coinfi/coinfi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coinfi/coinfi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coinfi/coinfi/git/refs{/sha}","trees_url":"https://api.github.com/repos/coinfi/coinfi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coinfi/coinfi/statuses/{sha}","languages_url":"https://api.github.com/repos/coinfi/coinfi/languages","stargazers_url":"https://api.github.com/repos/coinfi/coinfi/stargazers","contributors_url":"https://api.github.com/repos/coinfi/coinfi/contributors","subscribers_url":"https://api.github.com/repos/coinfi/coinfi/subscribers","subscription_url":"https://api.github.com/repos/coinfi/coinfi/subscription","commits_url":"https://api.github.com/repos/coinfi/coinfi/commits{/sha}","git_commits_url":"https://api.github.com/repos/coinfi/coinfi/git/commits{/sha}","comments_url":"https://api.github.com/repos/coinfi/coinfi/comments{/number}","issue_comment_url":"https://api.github.com/repos/coinfi/coinfi/issues/comments{/number}","contents_url":"https://api.github.com/repos/coinfi/coinfi/contents/{+path}","compare_url":"https://api.github.com/repos/coinfi/coinfi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coinfi/coinfi/merges","archive_url":"https://api.github.com/repos/coinfi/coinfi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coinfi/coinfi/downloads","issues_url":"https://api.github.com/repos/coinfi/coinfi/issues{/number}","pulls_url":"https://api.github.com/repos/coinfi/coinfi/pulls{/number}","milestones_url":"https://api.github.com/repos/coinfi/coinfi/milestones{/number}","notifications_url":"https://api.github.com/repos/coinfi/coinfi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coinfi/coinfi/labels{/name}","releases_url":"https://api.github.com/repos/coinfi/coinfi/releases{/id}","deployments_url":"https://api.github.com/repos/coinfi/coinfi/deployments","created_at":"2017-08-31T21:28:02Z","updated_at":"2018-10-04T05:41:25Z","pushed_at":"2018-10-05T02:21:51Z","git_url":"git://github.com/coinfi/coinfi.git","ssh_url":"git@github.com:coinfi/coinfi.git","clone_url":"https://github.com/coinfi/coinfi.git","svn_url":"https://github.com/coinfi/coinfi","homepage":"https://www.coinfi.com","size":129828,"stargazers_count":48,"watchers_count":48,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":15,"license":null,"forks":15,"open_issues":15,"watchers":48,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/coinfi/coinfi/pulls/463"},"html":{"href":"https://github.com/coinfi/coinfi/pull/463"},"issue":{"href":"https://api.github.com/repos/coinfi/coinfi/issues/463"},"comments":{"href":"https://api.github.com/repos/coinfi/coinfi/issues/463/comments"},"review_comments":{"href":"https://api.github.com/repos/coinfi/coinfi/pulls/463/comments"},"review_comment":{"href":"https://api.github.com/repos/coinfi/coinfi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coinfi/coinfi/pulls/463/commits"},"statuses":{"href":"https://api.github.com/repos/coinfi/coinfi/statuses/d9ec16c2ba6c538301889d0ba40c3afce2cd249f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"hanchang"}}