{"action":"created","comment":{"url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/pulls/comments/139702751","pull_request_review_id":63671664,"id":139702751,"diff_hunk":"@@ -0,0 +1,46 @@\n+import os\n+import requests\n+import json\n+import time\n+import logging\n+\n+logger = logging.getLogger(__name__)\n+\n+GREMLIN_SERVER_URL_REST = \"http://{host}:{port}\".format(\n+                          host=os.environ.get(\"BAYESIAN_GREMLIN_HTTP_SERVICE_HOST\", \"localhost\"),\n+                          port=os.environ.get(\"BAYESIAN_GREMLIN_HTTP_SERVICE_PORT\", \"8182\"))\n+\n+GRAPH_INITIALIZED = False\n+SCHEMA_CREATED = False\n+# wait for graph to be initialized\n+while not GRAPH_INITIALIZED:\n+    try:\n+        print(\"Calling GREMLIN - \" + GREMLIN_SERVER_URL_REST)\n+        resp = requests.get(GREMLIN_SERVER_URL_REST)\n+        if resp.status_code >= 200:\n+            logger.info(\"Gremlin Instance available\")\n+            GRAPH_INITIALIZED = True\n+            break\n+    except:\n+        print(\"Waiting for Gremlin HTTP to be initialized. Sleeping for 10 seconds\")\n+        time.sleep(10)\n+        continue\n+\n+# send the schema payload for creation\n+current_file_path = os.path.dirname(os.path.realpath(__file__))\n+schema_file_path = os.path.join(current_file_path, 'schema.groovy')\n+with open(schema_file_path, 'r') as f:\n+    str_gremlin_dsl = f.read()\n+\n+while not SCHEMA_CREATED:\n+    print(\"Creating Graph Schema Now...\")","path":"hack/create_graph_schema.py","position":36,"original_position":36,"commit_id":"71643fd69dd82a25b709e0f39195da5b0d66a34d","original_commit_id":"71643fd69dd82a25b709e0f39195da5b0d66a34d","user":{"login":"miteshvp","id":17736013,"avatar_url":"https://avatars2.githubusercontent.com/u/17736013?v=4","gravatar_id":"","url":"https://api.github.com/users/miteshvp","html_url":"https://github.com/miteshvp","followers_url":"https://api.github.com/users/miteshvp/followers","following_url":"https://api.github.com/users/miteshvp/following{/other_user}","gists_url":"https://api.github.com/users/miteshvp/gists{/gist_id}","starred_url":"https://api.github.com/users/miteshvp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miteshvp/subscriptions","organizations_url":"https://api.github.com/users/miteshvp/orgs","repos_url":"https://api.github.com/users/miteshvp/repos","events_url":"https://api.github.com/users/miteshvp/events{/privacy}","received_events_url":"https://api.github.com/users/miteshvp/received_events","type":"User","site_admin":false},"body":"tried logger.debug and logger.info","created_at":"2017-09-19T14:07:43Z","updated_at":"2017-09-19T14:07:44Z","html_url":"https://github.com/fabric8-analytics/fabric8-analytics-worker/pull/335#discussion_r139702751","pull_request_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/pulls/335","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/pulls/comments/139702751"},"html":{"href":"https://github.com/fabric8-analytics/fabric8-analytics-worker/pull/335#discussion_r139702751"},"pull_request":{"href":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/pulls/335"}},"in_reply_to_id":139681922},"pull_request":{"url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/pulls/335","id":140835444,"html_url":"https://github.com/fabric8-analytics/fabric8-analytics-worker/pull/335","diff_url":"https://github.com/fabric8-analytics/fabric8-analytics-worker/pull/335.diff","patch_url":"https://github.com/fabric8-analytics/fabric8-analytics-worker/pull/335.patch","issue_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/issues/335","number":335,"state":"open","locked":false,"title":"Dataimporter as worker","user":{"login":"miteshvp","id":17736013,"avatar_url":"https://avatars2.githubusercontent.com/u/17736013?v=4","gravatar_id":"","url":"https://api.github.com/users/miteshvp","html_url":"https://github.com/miteshvp","followers_url":"https://api.github.com/users/miteshvp/followers","following_url":"https://api.github.com/users/miteshvp/following{/other_user}","gists_url":"https://api.github.com/users/miteshvp/gists{/gist_id}","starred_url":"https://api.github.com/users/miteshvp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miteshvp/subscriptions","organizations_url":"https://api.github.com/users/miteshvp/orgs","repos_url":"https://api.github.com/users/miteshvp/repos","events_url":"https://api.github.com/users/miteshvp/events{/privacy}","received_events_url":"https://api.github.com/users/miteshvp/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-09-13T14:07:18Z","updated_at":"2017-09-19T14:07:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9570de67f4f220d10fe4214a8b56c60084da1bfe","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/pulls/335/commits","review_comments_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/pulls/335/comments","review_comment_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/issues/335/comments","statuses_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/statuses/71643fd69dd82a25b709e0f39195da5b0d66a34d","head":{"label":"miteshvp:dataimporter_as_worker","ref":"dataimporter_as_worker","sha":"71643fd69dd82a25b709e0f39195da5b0d66a34d","user":{"login":"miteshvp","id":17736013,"avatar_url":"https://avatars2.githubusercontent.com/u/17736013?v=4","gravatar_id":"","url":"https://api.github.com/users/miteshvp","html_url":"https://github.com/miteshvp","followers_url":"https://api.github.com/users/miteshvp/followers","following_url":"https://api.github.com/users/miteshvp/following{/other_user}","gists_url":"https://api.github.com/users/miteshvp/gists{/gist_id}","starred_url":"https://api.github.com/users/miteshvp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miteshvp/subscriptions","organizations_url":"https://api.github.com/users/miteshvp/orgs","repos_url":"https://api.github.com/users/miteshvp/repos","events_url":"https://api.github.com/users/miteshvp/events{/privacy}","received_events_url":"https://api.github.com/users/miteshvp/received_events","type":"User","site_admin":false},"repo":{"id":89997505,"name":"fabric8-analytics-worker","full_name":"miteshvp/fabric8-analytics-worker","owner":{"login":"miteshvp","id":17736013,"avatar_url":"https://avatars2.githubusercontent.com/u/17736013?v=4","gravatar_id":"","url":"https://api.github.com/users/miteshvp","html_url":"https://github.com/miteshvp","followers_url":"https://api.github.com/users/miteshvp/followers","following_url":"https://api.github.com/users/miteshvp/following{/other_user}","gists_url":"https://api.github.com/users/miteshvp/gists{/gist_id}","starred_url":"https://api.github.com/users/miteshvp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miteshvp/subscriptions","organizations_url":"https://api.github.com/users/miteshvp/orgs","repos_url":"https://api.github.com/users/miteshvp/repos","events_url":"https://api.github.com/users/miteshvp/events{/privacy}","received_events_url":"https://api.github.com/users/miteshvp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/miteshvp/fabric8-analytics-worker","description":null,"fork":true,"url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker","forks_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/forks","keys_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/teams","hooks_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/hooks","issue_events_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/issues/events{/number}","events_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/events","assignees_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/assignees{/user}","branches_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/branches{/branch}","tags_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/tags","blobs_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/git/refs{/sha}","trees_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/statuses/{sha}","languages_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/languages","stargazers_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/stargazers","contributors_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/contributors","subscribers_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/subscribers","subscription_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/subscription","commits_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/commits{/sha}","git_commits_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/git/commits{/sha}","comments_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/comments{/number}","issue_comment_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/issues/comments{/number}","contents_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/contents/{+path}","compare_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/merges","archive_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/downloads","issues_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/issues{/number}","pulls_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/pulls{/number}","milestones_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/milestones{/number}","notifications_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/labels{/name}","releases_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/releases{/id}","deployments_url":"https://api.github.com/repos/miteshvp/fabric8-analytics-worker/deployments","created_at":"2017-05-02T06:08:19Z","updated_at":"2017-05-02T06:08:22Z","pushed_at":"2017-09-18T08:37:35Z","git_url":"git://github.com/miteshvp/fabric8-analytics-worker.git","ssh_url":"git@github.com:miteshvp/fabric8-analytics-worker.git","clone_url":"https://github.com/miteshvp/fabric8-analytics-worker.git","svn_url":"https://github.com/miteshvp/fabric8-analytics-worker","homepage":null,"size":2202,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"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":"fabric8-analytics:master","ref":"master","sha":"d562bbbdbfbb405ba33b6611f744f528eac16abf","user":{"login":"fabric8-analytics","id":28134954,"avatar_url":"https://avatars3.githubusercontent.com/u/28134954?v=4","gravatar_id":"","url":"https://api.github.com/users/fabric8-analytics","html_url":"https://github.com/fabric8-analytics","followers_url":"https://api.github.com/users/fabric8-analytics/followers","following_url":"https://api.github.com/users/fabric8-analytics/following{/other_user}","gists_url":"https://api.github.com/users/fabric8-analytics/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8-analytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8-analytics/subscriptions","organizations_url":"https://api.github.com/users/fabric8-analytics/orgs","repos_url":"https://api.github.com/users/fabric8-analytics/repos","events_url":"https://api.github.com/users/fabric8-analytics/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8-analytics/received_events","type":"Organization","site_admin":false},"repo":{"id":89703823,"name":"fabric8-analytics-worker","full_name":"fabric8-analytics/fabric8-analytics-worker","owner":{"login":"fabric8-analytics","id":28134954,"avatar_url":"https://avatars3.githubusercontent.com/u/28134954?v=4","gravatar_id":"","url":"https://api.github.com/users/fabric8-analytics","html_url":"https://github.com/fabric8-analytics","followers_url":"https://api.github.com/users/fabric8-analytics/followers","following_url":"https://api.github.com/users/fabric8-analytics/following{/other_user}","gists_url":"https://api.github.com/users/fabric8-analytics/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8-analytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8-analytics/subscriptions","organizations_url":"https://api.github.com/users/fabric8-analytics/orgs","repos_url":"https://api.github.com/users/fabric8-analytics/repos","events_url":"https://api.github.com/users/fabric8-analytics/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8-analytics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fabric8-analytics/fabric8-analytics-worker","description":"fabric8-analytics worker for gathering raw data","fork":false,"url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker","forks_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/forks","keys_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/teams","hooks_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/hooks","issue_events_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/issues/events{/number}","events_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/events","assignees_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/assignees{/user}","branches_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/branches{/branch}","tags_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/tags","blobs_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/statuses/{sha}","languages_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/languages","stargazers_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/stargazers","contributors_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/contributors","subscribers_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/subscribers","subscription_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/subscription","commits_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/contents/{+path}","compare_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/merges","archive_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/downloads","issues_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/issues{/number}","pulls_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/pulls{/number}","milestones_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/milestones{/number}","notifications_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/labels{/name}","releases_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/releases{/id}","deployments_url":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/deployments","created_at":"2017-04-28T12:25:15Z","updated_at":"2017-08-01T19:09:05Z","pushed_at":"2017-09-19T10:13:11Z","git_url":"git://github.com/fabric8-analytics/fabric8-analytics-worker.git","ssh_url":"git@github.com:fabric8-analytics/fabric8-analytics-worker.git","clone_url":"https://github.com/fabric8-analytics/fabric8-analytics-worker.git","svn_url":"https://github.com/fabric8-analytics/fabric8-analytics-worker","homepage":"","size":2166,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":26,"forks":21,"open_issues":26,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/pulls/335"},"html":{"href":"https://github.com/fabric8-analytics/fabric8-analytics-worker/pull/335"},"issue":{"href":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/issues/335"},"comments":{"href":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/issues/335/comments"},"review_comments":{"href":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/pulls/335/comments"},"review_comment":{"href":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/pulls/335/commits"},"statuses":{"href":"https://api.github.com/repos/fabric8-analytics/fabric8-analytics-worker/statuses/71643fd69dd82a25b709e0f39195da5b0d66a34d"}},"author_association":"OWNER"}}
{"actor":{"display_login":"miteshvp"}}