{"action":"created","comment":{"url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/pulls/comments/238142503","pull_request_review_id":180611752,"id":238142503,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODE0MjUwMw==","diff_hunk":"@@ -0,0 +1,73 @@\n+#!/usr/bin/env python3\n+\n+from chunkedgraph.meshing.meshgen import mesh_lvl2_preview\n+import chunkedgraph\n+import os\n+from celery import Celery\n+from celery.utils.log import get_task_logger\n+import pika\n+import json\n+logger = get_task_logger(__name__)\n+\n+# set username and password for broker, with overrides from environment variables\n+rabbitmq_user = os.environ.get('RABBITMQ_USERNAME', 'rabbit')\n+rabbitmq_password = os.environ.get('RABBITMQ_PASSWORD', 'bitnami')\n+rabbitmq_vhost = os.environ.get('RABBITMQ_VHOST', '/')\n+remesh_exchange = os.environ.get('RABBIGMQ_REMESH_EXCHANGE', 'remeshing')\n+# Get Kubernetes-provided address of the broker service\n+broker_service_host = os.environ.get(\n+    'MESSAGE_QUEUE_SERVICE_HOST', ' rabbitmq-daf-rabbitmq-svc')\n+# could also use DNS name: 'message-queue'|'message-queue.default.svc.cluster.local'\n+# for our default\n+\n+broker_url = 'amqp://%s:%s@%s/%s' % (rabbitmq_user,\n+                                     rabbitmq_password,\n+                                     broker_service_host,\n+                                     rabbitmq_vhost)\n+# this sets this module up as a celery worker app\n+app = Celery('tasks', broker=broker_url, backend='amqp')\n+\n+# this sets up the pike client to do a broadcast of the remeshing event","path":"pychunkedgraph/meshing/worker.py","position":null,"original_position":30,"commit_id":"e3ec5ff6a86f2d02f42f2dfe68cb51dfa852f71a","original_commit_id":"d1711508ac022b8072822312176bd6694e5f32bf","user":{"login":"fcollman","id":782341,"node_id":"MDQ6VXNlcjc4MjM0MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/782341?v=4","gravatar_id":"","url":"https://api.github.com/users/fcollman","html_url":"https://github.com/fcollman","followers_url":"https://api.github.com/users/fcollman/followers","following_url":"https://api.github.com/users/fcollman/following{/other_user}","gists_url":"https://api.github.com/users/fcollman/gists{/gist_id}","starred_url":"https://api.github.com/users/fcollman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fcollman/subscriptions","organizations_url":"https://api.github.com/users/fcollman/orgs","repos_url":"https://api.github.com/users/fcollman/repos","events_url":"https://api.github.com/users/fcollman/events{/privacy}","received_events_url":"https://api.github.com/users/fcollman/received_events","type":"User","site_admin":false},"body":"fixed","created_at":"2018-12-03T04:32:33Z","updated_at":"2018-12-03T04:32:33Z","html_url":"https://github.com/seung-lab/PyChunkedGraph/pull/113#discussion_r238142503","pull_request_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/pulls/113","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/seung-lab/PyChunkedGraph/pulls/comments/238142503"},"html":{"href":"https://github.com/seung-lab/PyChunkedGraph/pull/113#discussion_r238142503"},"pull_request":{"href":"https://api.github.com/repos/seung-lab/PyChunkedGraph/pulls/113"}},"in_reply_to_id":238085591},"pull_request":{"url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/pulls/113","id":235222068,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1MjIyMDY4","html_url":"https://github.com/seung-lab/PyChunkedGraph/pull/113","diff_url":"https://github.com/seung-lab/PyChunkedGraph/pull/113.diff","patch_url":"https://github.com/seung-lab/PyChunkedGraph/pull/113.patch","issue_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/issues/113","number":113,"state":"open","locked":false,"title":"moving remeshing to optionally use rabbitmq celery workers and message broadcasting","user":{"login":"fcollman","id":782341,"node_id":"MDQ6VXNlcjc4MjM0MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/782341?v=4","gravatar_id":"","url":"https://api.github.com/users/fcollman","html_url":"https://github.com/fcollman","followers_url":"https://api.github.com/users/fcollman/followers","following_url":"https://api.github.com/users/fcollman/following{/other_user}","gists_url":"https://api.github.com/users/fcollman/gists{/gist_id}","starred_url":"https://api.github.com/users/fcollman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fcollman/subscriptions","organizations_url":"https://api.github.com/users/fcollman/orgs","repos_url":"https://api.github.com/users/fcollman/repos","events_url":"https://api.github.com/users/fcollman/events{/privacy}","received_events_url":"https://api.github.com/users/fcollman/received_events","type":"User","site_admin":false},"body":"This will decouple the remeshing workers from the pcg, allowing them to scale differently if needed, and also adds broadcasting of the remeshing events to a rabbitmq exchange.  compartment classification workers might declare a queue on that exchange to know when they might need to rerun themselves.   the remeshing itself now takes an optional argument to use a celery worker (Default no for now).  We can test that this works before merging but i wanted to get your eyes on it early. ","created_at":"2018-12-01T22:12:18Z","updated_at":"2018-12-03T04:32:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8bc44e51f7a294dbe0ae279a4c22b79391448940","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/pulls/113/commits","review_comments_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/pulls/113/comments","review_comment_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/issues/113/comments","statuses_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/statuses/e3ec5ff6a86f2d02f42f2dfe68cb51dfa852f71a","head":{"label":"seung-lab:fcc-meshing-rabbitmq","ref":"fcc-meshing-rabbitmq","sha":"e3ec5ff6a86f2d02f42f2dfe68cb51dfa852f71a","user":{"login":"seung-lab","id":796718,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5NjcxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/796718?v=4","gravatar_id":"","url":"https://api.github.com/users/seung-lab","html_url":"https://github.com/seung-lab","followers_url":"https://api.github.com/users/seung-lab/followers","following_url":"https://api.github.com/users/seung-lab/following{/other_user}","gists_url":"https://api.github.com/users/seung-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/seung-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seung-lab/subscriptions","organizations_url":"https://api.github.com/users/seung-lab/orgs","repos_url":"https://api.github.com/users/seung-lab/repos","events_url":"https://api.github.com/users/seung-lab/events{/privacy}","received_events_url":"https://api.github.com/users/seung-lab/received_events","type":"Organization","site_admin":false},"repo":{"id":125896846,"node_id":"MDEwOlJlcG9zaXRvcnkxMjU4OTY4NDY=","name":"PyChunkedGraph","full_name":"seung-lab/PyChunkedGraph","private":false,"owner":{"login":"seung-lab","id":796718,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5NjcxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/796718?v=4","gravatar_id":"","url":"https://api.github.com/users/seung-lab","html_url":"https://github.com/seung-lab","followers_url":"https://api.github.com/users/seung-lab/followers","following_url":"https://api.github.com/users/seung-lab/following{/other_user}","gists_url":"https://api.github.com/users/seung-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/seung-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seung-lab/subscriptions","organizations_url":"https://api.github.com/users/seung-lab/orgs","repos_url":"https://api.github.com/users/seung-lab/repos","events_url":"https://api.github.com/users/seung-lab/events{/privacy}","received_events_url":"https://api.github.com/users/seung-lab/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/seung-lab/PyChunkedGraph","description":"Chunked graph structure used for human proof-reading in Python","fork":false,"url":"https://api.github.com/repos/seung-lab/PyChunkedGraph","forks_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/forks","keys_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/teams","hooks_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/hooks","issue_events_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/issues/events{/number}","events_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/events","assignees_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/assignees{/user}","branches_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/branches{/branch}","tags_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/tags","blobs_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/git/refs{/sha}","trees_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/statuses/{sha}","languages_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/languages","stargazers_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/stargazers","contributors_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/contributors","subscribers_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/subscribers","subscription_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/subscription","commits_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/commits{/sha}","git_commits_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/git/commits{/sha}","comments_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/comments{/number}","issue_comment_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/issues/comments{/number}","contents_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/contents/{+path}","compare_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/merges","archive_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/downloads","issues_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/issues{/number}","pulls_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/pulls{/number}","milestones_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/milestones{/number}","notifications_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/labels{/name}","releases_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/releases{/id}","deployments_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/deployments","created_at":"2018-03-19T17:38:58Z","updated_at":"2018-12-01T19:37:41Z","pushed_at":"2018-12-03T04:32:13Z","git_url":"git://github.com/seung-lab/PyChunkedGraph.git","ssh_url":"git@github.com:seung-lab/PyChunkedGraph.git","clone_url":"https://github.com/seung-lab/PyChunkedGraph.git","svn_url":"https://github.com/seung-lab/PyChunkedGraph","homepage":"","size":2398,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":20,"watchers":0,"default_branch":"master"}},"base":{"label":"seung-lab:master","ref":"master","sha":"452544faf2bf956c08d0a959fa1cf76ebbea3ecc","user":{"login":"seung-lab","id":796718,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5NjcxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/796718?v=4","gravatar_id":"","url":"https://api.github.com/users/seung-lab","html_url":"https://github.com/seung-lab","followers_url":"https://api.github.com/users/seung-lab/followers","following_url":"https://api.github.com/users/seung-lab/following{/other_user}","gists_url":"https://api.github.com/users/seung-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/seung-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seung-lab/subscriptions","organizations_url":"https://api.github.com/users/seung-lab/orgs","repos_url":"https://api.github.com/users/seung-lab/repos","events_url":"https://api.github.com/users/seung-lab/events{/privacy}","received_events_url":"https://api.github.com/users/seung-lab/received_events","type":"Organization","site_admin":false},"repo":{"id":125896846,"node_id":"MDEwOlJlcG9zaXRvcnkxMjU4OTY4NDY=","name":"PyChunkedGraph","full_name":"seung-lab/PyChunkedGraph","private":false,"owner":{"login":"seung-lab","id":796718,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5NjcxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/796718?v=4","gravatar_id":"","url":"https://api.github.com/users/seung-lab","html_url":"https://github.com/seung-lab","followers_url":"https://api.github.com/users/seung-lab/followers","following_url":"https://api.github.com/users/seung-lab/following{/other_user}","gists_url":"https://api.github.com/users/seung-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/seung-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seung-lab/subscriptions","organizations_url":"https://api.github.com/users/seung-lab/orgs","repos_url":"https://api.github.com/users/seung-lab/repos","events_url":"https://api.github.com/users/seung-lab/events{/privacy}","received_events_url":"https://api.github.com/users/seung-lab/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/seung-lab/PyChunkedGraph","description":"Chunked graph structure used for human proof-reading in Python","fork":false,"url":"https://api.github.com/repos/seung-lab/PyChunkedGraph","forks_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/forks","keys_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/teams","hooks_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/hooks","issue_events_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/issues/events{/number}","events_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/events","assignees_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/assignees{/user}","branches_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/branches{/branch}","tags_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/tags","blobs_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/git/refs{/sha}","trees_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/statuses/{sha}","languages_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/languages","stargazers_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/stargazers","contributors_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/contributors","subscribers_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/subscribers","subscription_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/subscription","commits_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/commits{/sha}","git_commits_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/git/commits{/sha}","comments_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/comments{/number}","issue_comment_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/issues/comments{/number}","contents_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/contents/{+path}","compare_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/merges","archive_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/downloads","issues_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/issues{/number}","pulls_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/pulls{/number}","milestones_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/milestones{/number}","notifications_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/labels{/name}","releases_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/releases{/id}","deployments_url":"https://api.github.com/repos/seung-lab/PyChunkedGraph/deployments","created_at":"2018-03-19T17:38:58Z","updated_at":"2018-12-01T19:37:41Z","pushed_at":"2018-12-03T04:32:13Z","git_url":"git://github.com/seung-lab/PyChunkedGraph.git","ssh_url":"git@github.com:seung-lab/PyChunkedGraph.git","clone_url":"https://github.com/seung-lab/PyChunkedGraph.git","svn_url":"https://github.com/seung-lab/PyChunkedGraph","homepage":"","size":2398,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":20,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/seung-lab/PyChunkedGraph/pulls/113"},"html":{"href":"https://github.com/seung-lab/PyChunkedGraph/pull/113"},"issue":{"href":"https://api.github.com/repos/seung-lab/PyChunkedGraph/issues/113"},"comments":{"href":"https://api.github.com/repos/seung-lab/PyChunkedGraph/issues/113/comments"},"review_comments":{"href":"https://api.github.com/repos/seung-lab/PyChunkedGraph/pulls/113/comments"},"review_comment":{"href":"https://api.github.com/repos/seung-lab/PyChunkedGraph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/seung-lab/PyChunkedGraph/pulls/113/commits"},"statuses":{"href":"https://api.github.com/repos/seung-lab/PyChunkedGraph/statuses/e3ec5ff6a86f2d02f42f2dfe68cb51dfa852f71a"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"fcollman"}}