{"action":"closed","number":1,"pull_request":{"url":"https://api.github.com/repos/grayb/django-q/pulls/1","id":59442289,"html_url":"https://github.com/grayb/django-q/pull/1","diff_url":"https://github.com/grayb/django-q/pull/1.diff","patch_url":"https://github.com/grayb/django-q/pull/1.patch","issue_url":"https://api.github.com/repos/grayb/django-q/issues/1","number":1,"state":"closed","locked":false,"title":"Close db connection before spawning worker.  Addresses #144","user":{"login":"grayb","id":564859,"avatar_url":"https://avatars.githubusercontent.com/u/564859?v=3","gravatar_id":"","url":"https://api.github.com/users/grayb","html_url":"https://github.com/grayb","followers_url":"https://api.github.com/users/grayb/followers","following_url":"https://api.github.com/users/grayb/following{/other_user}","gists_url":"https://api.github.com/users/grayb/gists{/gist_id}","starred_url":"https://api.github.com/users/grayb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grayb/subscriptions","organizations_url":"https://api.github.com/users/grayb/orgs","repos_url":"https://api.github.com/users/grayb/repos","events_url":"https://api.github.com/users/grayb/events{/privacy}","received_events_url":"https://api.github.com/users/grayb/received_events","type":"User","site_admin":false},"body":"Having noticed that when the cluster is spawned the db connection is closed immediately prior to spawning said processes, I tested this solution successfully on my local install.  With this one extra line in place, I am no longer experiencing the \"ERROR connection already closed\" when a worker recycles.","created_at":"2016-02-16T04:28:06Z","updated_at":"2016-02-16T04:34:31Z","closed_at":"2016-02-16T04:34:31Z","merged_at":null,"merge_commit_sha":"56e2d35c29eb9e9edd22625c022af492a42919ef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/grayb/django-q/pulls/1/commits","review_comments_url":"https://api.github.com/repos/grayb/django-q/pulls/1/comments","review_comment_url":"https://api.github.com/repos/grayb/django-q/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grayb/django-q/issues/1/comments","statuses_url":"https://api.github.com/repos/grayb/django-q/statuses/5a3fb4bfd439b70cf7aa3be4f8caa2403c23ad3c","head":{"label":"grayb:db-already-closed-#144","ref":"db-already-closed-#144","sha":"5a3fb4bfd439b70cf7aa3be4f8caa2403c23ad3c","user":{"login":"grayb","id":564859,"avatar_url":"https://avatars.githubusercontent.com/u/564859?v=3","gravatar_id":"","url":"https://api.github.com/users/grayb","html_url":"https://github.com/grayb","followers_url":"https://api.github.com/users/grayb/followers","following_url":"https://api.github.com/users/grayb/following{/other_user}","gists_url":"https://api.github.com/users/grayb/gists{/gist_id}","starred_url":"https://api.github.com/users/grayb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grayb/subscriptions","organizations_url":"https://api.github.com/users/grayb/orgs","repos_url":"https://api.github.com/users/grayb/repos","events_url":"https://api.github.com/users/grayb/events{/privacy}","received_events_url":"https://api.github.com/users/grayb/received_events","type":"User","site_admin":false},"repo":{"id":51807511,"name":"django-q","full_name":"grayb/django-q","owner":{"login":"grayb","id":564859,"avatar_url":"https://avatars.githubusercontent.com/u/564859?v=3","gravatar_id":"","url":"https://api.github.com/users/grayb","html_url":"https://github.com/grayb","followers_url":"https://api.github.com/users/grayb/followers","following_url":"https://api.github.com/users/grayb/following{/other_user}","gists_url":"https://api.github.com/users/grayb/gists{/gist_id}","starred_url":"https://api.github.com/users/grayb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grayb/subscriptions","organizations_url":"https://api.github.com/users/grayb/orgs","repos_url":"https://api.github.com/users/grayb/repos","events_url":"https://api.github.com/users/grayb/events{/privacy}","received_events_url":"https://api.github.com/users/grayb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/grayb/django-q","description":"A multiprocessing distributed task queue for Django","fork":true,"url":"https://api.github.com/repos/grayb/django-q","forks_url":"https://api.github.com/repos/grayb/django-q/forks","keys_url":"https://api.github.com/repos/grayb/django-q/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grayb/django-q/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grayb/django-q/teams","hooks_url":"https://api.github.com/repos/grayb/django-q/hooks","issue_events_url":"https://api.github.com/repos/grayb/django-q/issues/events{/number}","events_url":"https://api.github.com/repos/grayb/django-q/events","assignees_url":"https://api.github.com/repos/grayb/django-q/assignees{/user}","branches_url":"https://api.github.com/repos/grayb/django-q/branches{/branch}","tags_url":"https://api.github.com/repos/grayb/django-q/tags","blobs_url":"https://api.github.com/repos/grayb/django-q/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grayb/django-q/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grayb/django-q/git/refs{/sha}","trees_url":"https://api.github.com/repos/grayb/django-q/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grayb/django-q/statuses/{sha}","languages_url":"https://api.github.com/repos/grayb/django-q/languages","stargazers_url":"https://api.github.com/repos/grayb/django-q/stargazers","contributors_url":"https://api.github.com/repos/grayb/django-q/contributors","subscribers_url":"https://api.github.com/repos/grayb/django-q/subscribers","subscription_url":"https://api.github.com/repos/grayb/django-q/subscription","commits_url":"https://api.github.com/repos/grayb/django-q/commits{/sha}","git_commits_url":"https://api.github.com/repos/grayb/django-q/git/commits{/sha}","comments_url":"https://api.github.com/repos/grayb/django-q/comments{/number}","issue_comment_url":"https://api.github.com/repos/grayb/django-q/issues/comments{/number}","contents_url":"https://api.github.com/repos/grayb/django-q/contents/{+path}","compare_url":"https://api.github.com/repos/grayb/django-q/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grayb/django-q/merges","archive_url":"https://api.github.com/repos/grayb/django-q/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grayb/django-q/downloads","issues_url":"https://api.github.com/repos/grayb/django-q/issues{/number}","pulls_url":"https://api.github.com/repos/grayb/django-q/pulls{/number}","milestones_url":"https://api.github.com/repos/grayb/django-q/milestones{/number}","notifications_url":"https://api.github.com/repos/grayb/django-q/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grayb/django-q/labels{/name}","releases_url":"https://api.github.com/repos/grayb/django-q/releases{/id}","deployments_url":"https://api.github.com/repos/grayb/django-q/deployments","created_at":"2016-02-16T04:19:13Z","updated_at":"2016-02-16T04:19:14Z","pushed_at":"2016-02-16T04:28:06Z","git_url":"git://github.com/grayb/django-q.git","ssh_url":"git@github.com:grayb/django-q.git","clone_url":"https://github.com/grayb/django-q.git","svn_url":"https://github.com/grayb/django-q","homepage":"https://django-q.readthedocs.org","size":1293,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":"grayb:master","ref":"master","sha":"140891bedf03103c2b2baefa2876e52caf3a865c","user":{"login":"grayb","id":564859,"avatar_url":"https://avatars.githubusercontent.com/u/564859?v=3","gravatar_id":"","url":"https://api.github.com/users/grayb","html_url":"https://github.com/grayb","followers_url":"https://api.github.com/users/grayb/followers","following_url":"https://api.github.com/users/grayb/following{/other_user}","gists_url":"https://api.github.com/users/grayb/gists{/gist_id}","starred_url":"https://api.github.com/users/grayb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grayb/subscriptions","organizations_url":"https://api.github.com/users/grayb/orgs","repos_url":"https://api.github.com/users/grayb/repos","events_url":"https://api.github.com/users/grayb/events{/privacy}","received_events_url":"https://api.github.com/users/grayb/received_events","type":"User","site_admin":false},"repo":{"id":51807511,"name":"django-q","full_name":"grayb/django-q","owner":{"login":"grayb","id":564859,"avatar_url":"https://avatars.githubusercontent.com/u/564859?v=3","gravatar_id":"","url":"https://api.github.com/users/grayb","html_url":"https://github.com/grayb","followers_url":"https://api.github.com/users/grayb/followers","following_url":"https://api.github.com/users/grayb/following{/other_user}","gists_url":"https://api.github.com/users/grayb/gists{/gist_id}","starred_url":"https://api.github.com/users/grayb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grayb/subscriptions","organizations_url":"https://api.github.com/users/grayb/orgs","repos_url":"https://api.github.com/users/grayb/repos","events_url":"https://api.github.com/users/grayb/events{/privacy}","received_events_url":"https://api.github.com/users/grayb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/grayb/django-q","description":"A multiprocessing distributed task queue for Django","fork":true,"url":"https://api.github.com/repos/grayb/django-q","forks_url":"https://api.github.com/repos/grayb/django-q/forks","keys_url":"https://api.github.com/repos/grayb/django-q/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grayb/django-q/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grayb/django-q/teams","hooks_url":"https://api.github.com/repos/grayb/django-q/hooks","issue_events_url":"https://api.github.com/repos/grayb/django-q/issues/events{/number}","events_url":"https://api.github.com/repos/grayb/django-q/events","assignees_url":"https://api.github.com/repos/grayb/django-q/assignees{/user}","branches_url":"https://api.github.com/repos/grayb/django-q/branches{/branch}","tags_url":"https://api.github.com/repos/grayb/django-q/tags","blobs_url":"https://api.github.com/repos/grayb/django-q/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grayb/django-q/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grayb/django-q/git/refs{/sha}","trees_url":"https://api.github.com/repos/grayb/django-q/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grayb/django-q/statuses/{sha}","languages_url":"https://api.github.com/repos/grayb/django-q/languages","stargazers_url":"https://api.github.com/repos/grayb/django-q/stargazers","contributors_url":"https://api.github.com/repos/grayb/django-q/contributors","subscribers_url":"https://api.github.com/repos/grayb/django-q/subscribers","subscription_url":"https://api.github.com/repos/grayb/django-q/subscription","commits_url":"https://api.github.com/repos/grayb/django-q/commits{/sha}","git_commits_url":"https://api.github.com/repos/grayb/django-q/git/commits{/sha}","comments_url":"https://api.github.com/repos/grayb/django-q/comments{/number}","issue_comment_url":"https://api.github.com/repos/grayb/django-q/issues/comments{/number}","contents_url":"https://api.github.com/repos/grayb/django-q/contents/{+path}","compare_url":"https://api.github.com/repos/grayb/django-q/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grayb/django-q/merges","archive_url":"https://api.github.com/repos/grayb/django-q/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grayb/django-q/downloads","issues_url":"https://api.github.com/repos/grayb/django-q/issues{/number}","pulls_url":"https://api.github.com/repos/grayb/django-q/pulls{/number}","milestones_url":"https://api.github.com/repos/grayb/django-q/milestones{/number}","notifications_url":"https://api.github.com/repos/grayb/django-q/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grayb/django-q/labels{/name}","releases_url":"https://api.github.com/repos/grayb/django-q/releases{/id}","deployments_url":"https://api.github.com/repos/grayb/django-q/deployments","created_at":"2016-02-16T04:19:13Z","updated_at":"2016-02-16T04:19:14Z","pushed_at":"2016-02-16T04:28:06Z","git_url":"git://github.com/grayb/django-q.git","ssh_url":"git@github.com:grayb/django-q.git","clone_url":"https://github.com/grayb/django-q.git","svn_url":"https://github.com/grayb/django-q","homepage":"https://django-q.readthedocs.org","size":1293,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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"}},"_links":{"self":{"href":"https://api.github.com/repos/grayb/django-q/pulls/1"},"html":{"href":"https://github.com/grayb/django-q/pull/1"},"issue":{"href":"https://api.github.com/repos/grayb/django-q/issues/1"},"comments":{"href":"https://api.github.com/repos/grayb/django-q/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/grayb/django-q/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/grayb/django-q/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grayb/django-q/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/grayb/django-q/statuses/5a3fb4bfd439b70cf7aa3be4f8caa2403c23ad3c"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":0,"changed_files":1}}