{"action":"created","comment":{"url":"https://api.github.com/repos/22Acacia/dreamboat/pulls/comments/47596673","id":47596673,"diff_hunk":"@@ -0,0 +1,95 @@\n+import pycurl\n+import json\n+import time\n+import logging\n+import ConfigParser\n+import threading\n+\n+CONFIG_FILE = 'config'\n+\n+def make_logger(log_name, log_level):\n+    # setup logger\n+    logger = logging.getLogger(log_name)\n+    logger.setLevel(log_level)\n+    # create console handler and set level to debug\n+    ch = logging.StreamHandler()\n+    ch.setLevel(logging.DEBUG)\n+    # create formatter\n+    formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')\n+    # add formatter to ch\n+    ch.setFormatter(formatter)\n+    # add ch to logger\n+    logger.addHandler(ch)\n+    return logger\n+\n+def give_life(source_url, data, DELAY, log_level):\n+    log_name = 'heartbeat_{0}'.format(source_url)\n+    logger = make_logger(log_name, log_level)\n+    while True:\n+        try:\n+            c = pycurl.Curl()\n+            c.setopt(pycurl.URL, source_url)\n+            c.setopt(pycurl.HTTPHEADER, ['Content-Type: application/json','X-22acaia-heartbeat: true'])","path":"dreamboat/main.py","position":32,"original_position":32,"commit_id":"ea988a5003dce48bb982bc67a5a7d57d84906089","original_commit_id":"ea988a5003dce48bb982bc67a5a7d57d84906089","user":{"login":"coffeepac","id":677786,"avatar_url":"https://avatars.githubusercontent.com/u/677786?v=3","gravatar_id":"","url":"https://api.github.com/users/coffeepac","html_url":"https://github.com/coffeepac","followers_url":"https://api.github.com/users/coffeepac/followers","following_url":"https://api.github.com/users/coffeepac/following{/other_user}","gists_url":"https://api.github.com/users/coffeepac/gists{/gist_id}","starred_url":"https://api.github.com/users/coffeepac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coffeepac/subscriptions","organizations_url":"https://api.github.com/users/coffeepac/orgs","repos_url":"https://api.github.com/users/coffeepac/repos","events_url":"https://api.github.com/users/coffeepac/events{/privacy}","received_events_url":"https://api.github.com/users/coffeepac/received_events","type":"User","site_admin":false},"body":"that's a sweet, sweet header.","created_at":"2015-12-15T04:53:37Z","updated_at":"2015-12-15T04:53:37Z","html_url":"https://github.com/22Acacia/dreamboat/pull/2#discussion_r47596673","pull_request_url":"https://api.github.com/repos/22Acacia/dreamboat/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/22Acacia/dreamboat/pulls/comments/47596673"},"html":{"href":"https://github.com/22Acacia/dreamboat/pull/2#discussion_r47596673"},"pull_request":{"href":"https://api.github.com/repos/22Acacia/dreamboat/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/22Acacia/dreamboat/pulls/2","id":53507642,"html_url":"https://github.com/22Acacia/dreamboat/pull/2","diff_url":"https://github.com/22Acacia/dreamboat/pull/2.diff","patch_url":"https://github.com/22Acacia/dreamboat/pull/2.patch","issue_url":"https://api.github.com/repos/22Acacia/dreamboat/issues/2","number":2,"state":"open","locked":false,"title":"Multiend","user":{"login":"jnwood","id":4574214,"avatar_url":"https://avatars.githubusercontent.com/u/4574214?v=3","gravatar_id":"","url":"https://api.github.com/users/jnwood","html_url":"https://github.com/jnwood","followers_url":"https://api.github.com/users/jnwood/followers","following_url":"https://api.github.com/users/jnwood/following{/other_user}","gists_url":"https://api.github.com/users/jnwood/gists{/gist_id}","starred_url":"https://api.github.com/users/jnwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnwood/subscriptions","organizations_url":"https://api.github.com/users/jnwood/orgs","repos_url":"https://api.github.com/users/jnwood/repos","events_url":"https://api.github.com/users/jnwood/events{/privacy}","received_events_url":"https://api.github.com/users/jnwood/received_events","type":"User","site_admin":false},"body":"supports multiple endpoints","created_at":"2015-12-13T19:42:30Z","updated_at":"2015-12-15T04:53:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3e7f9ffcb216dfa2cf514c770a7b2536ad756358","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/22Acacia/dreamboat/pulls/2/commits","review_comments_url":"https://api.github.com/repos/22Acacia/dreamboat/pulls/2/comments","review_comment_url":"https://api.github.com/repos/22Acacia/dreamboat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/22Acacia/dreamboat/issues/2/comments","statuses_url":"https://api.github.com/repos/22Acacia/dreamboat/statuses/ea988a5003dce48bb982bc67a5a7d57d84906089","head":{"label":"22Acacia:multiend","ref":"multiend","sha":"ea988a5003dce48bb982bc67a5a7d57d84906089","user":{"login":"22Acacia","id":13910679,"avatar_url":"https://avatars.githubusercontent.com/u/13910679?v=3","gravatar_id":"","url":"https://api.github.com/users/22Acacia","html_url":"https://github.com/22Acacia","followers_url":"https://api.github.com/users/22Acacia/followers","following_url":"https://api.github.com/users/22Acacia/following{/other_user}","gists_url":"https://api.github.com/users/22Acacia/gists{/gist_id}","starred_url":"https://api.github.com/users/22Acacia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/22Acacia/subscriptions","organizations_url":"https://api.github.com/users/22Acacia/orgs","repos_url":"https://api.github.com/users/22Acacia/repos","events_url":"https://api.github.com/users/22Acacia/events{/privacy}","received_events_url":"https://api.github.com/users/22Acacia/received_events","type":"Organization","site_admin":false},"repo":{"id":47844988,"name":"dreamboat","full_name":"22Acacia/dreamboat","owner":{"login":"22Acacia","id":13910679,"avatar_url":"https://avatars.githubusercontent.com/u/13910679?v=3","gravatar_id":"","url":"https://api.github.com/users/22Acacia","html_url":"https://github.com/22Acacia","followers_url":"https://api.github.com/users/22Acacia/followers","following_url":"https://api.github.com/users/22Acacia/following{/other_user}","gists_url":"https://api.github.com/users/22Acacia/gists{/gist_id}","starred_url":"https://api.github.com/users/22Acacia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/22Acacia/subscriptions","organizations_url":"https://api.github.com/users/22Acacia/orgs","repos_url":"https://api.github.com/users/22Acacia/repos","events_url":"https://api.github.com/users/22Acacia/events{/privacy}","received_events_url":"https://api.github.com/users/22Acacia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/22Acacia/dreamboat","description":"Configurable heartbeat maker","fork":false,"url":"https://api.github.com/repos/22Acacia/dreamboat","forks_url":"https://api.github.com/repos/22Acacia/dreamboat/forks","keys_url":"https://api.github.com/repos/22Acacia/dreamboat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/22Acacia/dreamboat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/22Acacia/dreamboat/teams","hooks_url":"https://api.github.com/repos/22Acacia/dreamboat/hooks","issue_events_url":"https://api.github.com/repos/22Acacia/dreamboat/issues/events{/number}","events_url":"https://api.github.com/repos/22Acacia/dreamboat/events","assignees_url":"https://api.github.com/repos/22Acacia/dreamboat/assignees{/user}","branches_url":"https://api.github.com/repos/22Acacia/dreamboat/branches{/branch}","tags_url":"https://api.github.com/repos/22Acacia/dreamboat/tags","blobs_url":"https://api.github.com/repos/22Acacia/dreamboat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/22Acacia/dreamboat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/22Acacia/dreamboat/git/refs{/sha}","trees_url":"https://api.github.com/repos/22Acacia/dreamboat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/22Acacia/dreamboat/statuses/{sha}","languages_url":"https://api.github.com/repos/22Acacia/dreamboat/languages","stargazers_url":"https://api.github.com/repos/22Acacia/dreamboat/stargazers","contributors_url":"https://api.github.com/repos/22Acacia/dreamboat/contributors","subscribers_url":"https://api.github.com/repos/22Acacia/dreamboat/subscribers","subscription_url":"https://api.github.com/repos/22Acacia/dreamboat/subscription","commits_url":"https://api.github.com/repos/22Acacia/dreamboat/commits{/sha}","git_commits_url":"https://api.github.com/repos/22Acacia/dreamboat/git/commits{/sha}","comments_url":"https://api.github.com/repos/22Acacia/dreamboat/comments{/number}","issue_comment_url":"https://api.github.com/repos/22Acacia/dreamboat/issues/comments{/number}","contents_url":"https://api.github.com/repos/22Acacia/dreamboat/contents/{+path}","compare_url":"https://api.github.com/repos/22Acacia/dreamboat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/22Acacia/dreamboat/merges","archive_url":"https://api.github.com/repos/22Acacia/dreamboat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/22Acacia/dreamboat/downloads","issues_url":"https://api.github.com/repos/22Acacia/dreamboat/issues{/number}","pulls_url":"https://api.github.com/repos/22Acacia/dreamboat/pulls{/number}","milestones_url":"https://api.github.com/repos/22Acacia/dreamboat/milestones{/number}","notifications_url":"https://api.github.com/repos/22Acacia/dreamboat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/22Acacia/dreamboat/labels{/name}","releases_url":"https://api.github.com/repos/22Acacia/dreamboat/releases{/id}","created_at":"2015-12-11T18:49:52Z","updated_at":"2015-12-11T18:49:52Z","pushed_at":"2015-12-14T07:04:25Z","git_url":"git://github.com/22Acacia/dreamboat.git","ssh_url":"git@github.com:22Acacia/dreamboat.git","clone_url":"https://github.com/22Acacia/dreamboat.git","svn_url":"https://github.com/22Acacia/dreamboat","homepage":null,"size":7,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"22Acacia:master","ref":"master","sha":"c980c3f4f50409e0cef3f11221da98a2273b83d3","user":{"login":"22Acacia","id":13910679,"avatar_url":"https://avatars.githubusercontent.com/u/13910679?v=3","gravatar_id":"","url":"https://api.github.com/users/22Acacia","html_url":"https://github.com/22Acacia","followers_url":"https://api.github.com/users/22Acacia/followers","following_url":"https://api.github.com/users/22Acacia/following{/other_user}","gists_url":"https://api.github.com/users/22Acacia/gists{/gist_id}","starred_url":"https://api.github.com/users/22Acacia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/22Acacia/subscriptions","organizations_url":"https://api.github.com/users/22Acacia/orgs","repos_url":"https://api.github.com/users/22Acacia/repos","events_url":"https://api.github.com/users/22Acacia/events{/privacy}","received_events_url":"https://api.github.com/users/22Acacia/received_events","type":"Organization","site_admin":false},"repo":{"id":47844988,"name":"dreamboat","full_name":"22Acacia/dreamboat","owner":{"login":"22Acacia","id":13910679,"avatar_url":"https://avatars.githubusercontent.com/u/13910679?v=3","gravatar_id":"","url":"https://api.github.com/users/22Acacia","html_url":"https://github.com/22Acacia","followers_url":"https://api.github.com/users/22Acacia/followers","following_url":"https://api.github.com/users/22Acacia/following{/other_user}","gists_url":"https://api.github.com/users/22Acacia/gists{/gist_id}","starred_url":"https://api.github.com/users/22Acacia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/22Acacia/subscriptions","organizations_url":"https://api.github.com/users/22Acacia/orgs","repos_url":"https://api.github.com/users/22Acacia/repos","events_url":"https://api.github.com/users/22Acacia/events{/privacy}","received_events_url":"https://api.github.com/users/22Acacia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/22Acacia/dreamboat","description":"Configurable heartbeat maker","fork":false,"url":"https://api.github.com/repos/22Acacia/dreamboat","forks_url":"https://api.github.com/repos/22Acacia/dreamboat/forks","keys_url":"https://api.github.com/repos/22Acacia/dreamboat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/22Acacia/dreamboat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/22Acacia/dreamboat/teams","hooks_url":"https://api.github.com/repos/22Acacia/dreamboat/hooks","issue_events_url":"https://api.github.com/repos/22Acacia/dreamboat/issues/events{/number}","events_url":"https://api.github.com/repos/22Acacia/dreamboat/events","assignees_url":"https://api.github.com/repos/22Acacia/dreamboat/assignees{/user}","branches_url":"https://api.github.com/repos/22Acacia/dreamboat/branches{/branch}","tags_url":"https://api.github.com/repos/22Acacia/dreamboat/tags","blobs_url":"https://api.github.com/repos/22Acacia/dreamboat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/22Acacia/dreamboat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/22Acacia/dreamboat/git/refs{/sha}","trees_url":"https://api.github.com/repos/22Acacia/dreamboat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/22Acacia/dreamboat/statuses/{sha}","languages_url":"https://api.github.com/repos/22Acacia/dreamboat/languages","stargazers_url":"https://api.github.com/repos/22Acacia/dreamboat/stargazers","contributors_url":"https://api.github.com/repos/22Acacia/dreamboat/contributors","subscribers_url":"https://api.github.com/repos/22Acacia/dreamboat/subscribers","subscription_url":"https://api.github.com/repos/22Acacia/dreamboat/subscription","commits_url":"https://api.github.com/repos/22Acacia/dreamboat/commits{/sha}","git_commits_url":"https://api.github.com/repos/22Acacia/dreamboat/git/commits{/sha}","comments_url":"https://api.github.com/repos/22Acacia/dreamboat/comments{/number}","issue_comment_url":"https://api.github.com/repos/22Acacia/dreamboat/issues/comments{/number}","contents_url":"https://api.github.com/repos/22Acacia/dreamboat/contents/{+path}","compare_url":"https://api.github.com/repos/22Acacia/dreamboat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/22Acacia/dreamboat/merges","archive_url":"https://api.github.com/repos/22Acacia/dreamboat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/22Acacia/dreamboat/downloads","issues_url":"https://api.github.com/repos/22Acacia/dreamboat/issues{/number}","pulls_url":"https://api.github.com/repos/22Acacia/dreamboat/pulls{/number}","milestones_url":"https://api.github.com/repos/22Acacia/dreamboat/milestones{/number}","notifications_url":"https://api.github.com/repos/22Acacia/dreamboat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/22Acacia/dreamboat/labels{/name}","releases_url":"https://api.github.com/repos/22Acacia/dreamboat/releases{/id}","created_at":"2015-12-11T18:49:52Z","updated_at":"2015-12-11T18:49:52Z","pushed_at":"2015-12-14T07:04:25Z","git_url":"git://github.com/22Acacia/dreamboat.git","ssh_url":"git@github.com:22Acacia/dreamboat.git","clone_url":"https://github.com/22Acacia/dreamboat.git","svn_url":"https://github.com/22Acacia/dreamboat","homepage":null,"size":7,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/22Acacia/dreamboat/pulls/2"},"html":{"href":"https://github.com/22Acacia/dreamboat/pull/2"},"issue":{"href":"https://api.github.com/repos/22Acacia/dreamboat/issues/2"},"comments":{"href":"https://api.github.com/repos/22Acacia/dreamboat/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/22Acacia/dreamboat/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/22Acacia/dreamboat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/22Acacia/dreamboat/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/22Acacia/dreamboat/statuses/ea988a5003dce48bb982bc67a5a7d57d84906089"}}}}