{"action":"created","comment":{"url":"https://api.github.com/repos/posativ/isso/pulls/comments/245488996","pull_request_review_id":189608992,"id":245488996,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTQ4ODk5Ng==","diff_hunk":"@@ -175,12 +176,17 @@ def notify_users(self, thread, comment):\n \n     def sendmail(self, subject, body, thread, comment, to=None):\n         to = to or self.conf.get(\"to\")\n-        if uwsgi:\n+        if self.isso.uwsgi and uwsgi:\n             uwsgi.spool({b\"subject\": subject.encode(\"utf-8\"),\n                          b\"body\": body.encode(\"utf-8\"),\n                          b\"to\": to.encode(\"utf-8\")})\n-        else:\n+        elif self.isso.threading:\n             start_new_thread(self._retry, (subject, body, to))\n+        elif self.isso.multiprocessing:\n+            multiprocessing.Process(\n+                target=self._retry, args=(subject, body, to)).start()\n+        else:\n+            self._retry(subject, body, to, attempts=1)","path":"isso/ext/notifications.py","position":33,"original_position":33,"commit_id":"a43982cc26f001fb715fdf674d990333c2f3cf3e","original_commit_id":"a43982cc26f001fb715fdf674d990333c2f3cf3e","user":{"login":"jelmer","id":49032,"node_id":"MDQ6VXNlcjQ5MDMy","avatar_url":"https://avatars3.githubusercontent.com/u/49032?v=4","gravatar_id":"","url":"https://api.github.com/users/jelmer","html_url":"https://github.com/jelmer","followers_url":"https://api.github.com/users/jelmer/followers","following_url":"https://api.github.com/users/jelmer/following{/other_user}","gists_url":"https://api.github.com/users/jelmer/gists{/gist_id}","starred_url":"https://api.github.com/users/jelmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelmer/subscriptions","organizations_url":"https://api.github.com/users/jelmer/orgs","repos_url":"https://api.github.com/users/jelmer/repos","events_url":"https://api.github.com/users/jelmer/events{/privacy}","received_events_url":"https://api.github.com/users/jelmer/received_events","type":"User","site_admin":false},"body":"why disable retrying?","created_at":"2019-01-05T21:19:52Z","updated_at":"2019-01-05T21:19:52Z","html_url":"https://github.com/posativ/isso/pull/516#discussion_r245488996","pull_request_url":"https://api.github.com/repos/posativ/isso/pulls/516","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/posativ/isso/pulls/comments/245488996"},"html":{"href":"https://github.com/posativ/isso/pull/516#discussion_r245488996"},"pull_request":{"href":"https://api.github.com/repos/posativ/isso/pulls/516"}}},"pull_request":{"url":"https://api.github.com/repos/posativ/isso/pulls/516","id":240836118,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwODM2MTE4","html_url":"https://github.com/posativ/isso/pull/516","diff_url":"https://github.com/posativ/isso/pull/516.diff","patch_url":"https://github.com/posativ/isso/pull/516.patch","issue_url":"https://api.github.com/repos/posativ/isso/issues/516","number":516,"state":"open","locked":false,"title":"Fix notifications when hosting on pythonanywhere.com","user":{"login":"brad","id":1614,"node_id":"MDQ6VXNlcjE2MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1614?v=4","gravatar_id":"","url":"https://api.github.com/users/brad","html_url":"https://github.com/brad","followers_url":"https://api.github.com/users/brad/followers","following_url":"https://api.github.com/users/brad/following{/other_user}","gists_url":"https://api.github.com/users/brad/gists{/gist_id}","starred_url":"https://api.github.com/users/brad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brad/subscriptions","organizations_url":"https://api.github.com/users/brad/orgs","repos_url":"https://api.github.com/users/brad/repos","events_url":"https://api.github.com/users/brad/events{/privacy}","received_events_url":"https://api.github.com/users/brad/received_events","type":"User","site_admin":false},"body":"Hey guys,\r\nNot sure if this is the right thing to do here, but I thought I'd share what I did to get things working in case it is helpful. I was having trouble with the email notifications on my site hosted at pythonanywhere.com. At first I was having issues where the `uwsgi` module has no `spool` attribute. I saw on google that that's something that has to be put in at compile time and I assumed I wouldn't be able to do that in the limited environment on pythonanywhere, so I tried just setting `uwsgi = None` in `notifications.py` but that didn't work either. No errors, but no notifications either. I assume because threading is not supported on pythonanywhere, as stated in [this faq](https://help.pythonanywhere.com/pages/AsyncInWebApps/). They do mention that multiprocessing is supported and that worked in my tests.\r\n\r\nMy general solution was to pass through the `threading`, `multiprocessing` and `uwsgi` flags through and using them in the `notifications.py` module to handle thing appropriately. Works for me, using this code in production currently.","created_at":"2018-12-25T06:00:53Z","updated_at":"2019-01-05T21:19:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39fff13ba2ac076f80f022f4578b5c0cf948a36f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/posativ/isso/pulls/516/commits","review_comments_url":"https://api.github.com/repos/posativ/isso/pulls/516/comments","review_comment_url":"https://api.github.com/repos/posativ/isso/pulls/comments{/number}","comments_url":"https://api.github.com/repos/posativ/isso/issues/516/comments","statuses_url":"https://api.github.com/repos/posativ/isso/statuses/a43982cc26f001fb715fdf674d990333c2f3cf3e","head":{"label":"WanderlandTravelers:multiprocessing-notifications","ref":"multiprocessing-notifications","sha":"a43982cc26f001fb715fdf674d990333c2f3cf3e","user":{"login":"WanderlandTravelers","id":17717904,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3NzE3OTA0","avatar_url":"https://avatars0.githubusercontent.com/u/17717904?v=4","gravatar_id":"","url":"https://api.github.com/users/WanderlandTravelers","html_url":"https://github.com/WanderlandTravelers","followers_url":"https://api.github.com/users/WanderlandTravelers/followers","following_url":"https://api.github.com/users/WanderlandTravelers/following{/other_user}","gists_url":"https://api.github.com/users/WanderlandTravelers/gists{/gist_id}","starred_url":"https://api.github.com/users/WanderlandTravelers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WanderlandTravelers/subscriptions","organizations_url":"https://api.github.com/users/WanderlandTravelers/orgs","repos_url":"https://api.github.com/users/WanderlandTravelers/repos","events_url":"https://api.github.com/users/WanderlandTravelers/events{/privacy}","received_events_url":"https://api.github.com/users/WanderlandTravelers/received_events","type":"Organization","site_admin":false},"repo":{"id":162778334,"node_id":"MDEwOlJlcG9zaXRvcnkxNjI3NzgzMzQ=","name":"isso","full_name":"WanderlandTravelers/isso","private":false,"owner":{"login":"WanderlandTravelers","id":17717904,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3NzE3OTA0","avatar_url":"https://avatars0.githubusercontent.com/u/17717904?v=4","gravatar_id":"","url":"https://api.github.com/users/WanderlandTravelers","html_url":"https://github.com/WanderlandTravelers","followers_url":"https://api.github.com/users/WanderlandTravelers/followers","following_url":"https://api.github.com/users/WanderlandTravelers/following{/other_user}","gists_url":"https://api.github.com/users/WanderlandTravelers/gists{/gist_id}","starred_url":"https://api.github.com/users/WanderlandTravelers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WanderlandTravelers/subscriptions","organizations_url":"https://api.github.com/users/WanderlandTravelers/orgs","repos_url":"https://api.github.com/users/WanderlandTravelers/repos","events_url":"https://api.github.com/users/WanderlandTravelers/events{/privacy}","received_events_url":"https://api.github.com/users/WanderlandTravelers/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/WanderlandTravelers/isso","description":"a Disqus alternative","fork":true,"url":"https://api.github.com/repos/WanderlandTravelers/isso","forks_url":"https://api.github.com/repos/WanderlandTravelers/isso/forks","keys_url":"https://api.github.com/repos/WanderlandTravelers/isso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WanderlandTravelers/isso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WanderlandTravelers/isso/teams","hooks_url":"https://api.github.com/repos/WanderlandTravelers/isso/hooks","issue_events_url":"https://api.github.com/repos/WanderlandTravelers/isso/issues/events{/number}","events_url":"https://api.github.com/repos/WanderlandTravelers/isso/events","assignees_url":"https://api.github.com/repos/WanderlandTravelers/isso/assignees{/user}","branches_url":"https://api.github.com/repos/WanderlandTravelers/isso/branches{/branch}","tags_url":"https://api.github.com/repos/WanderlandTravelers/isso/tags","blobs_url":"https://api.github.com/repos/WanderlandTravelers/isso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WanderlandTravelers/isso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WanderlandTravelers/isso/git/refs{/sha}","trees_url":"https://api.github.com/repos/WanderlandTravelers/isso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WanderlandTravelers/isso/statuses/{sha}","languages_url":"https://api.github.com/repos/WanderlandTravelers/isso/languages","stargazers_url":"https://api.github.com/repos/WanderlandTravelers/isso/stargazers","contributors_url":"https://api.github.com/repos/WanderlandTravelers/isso/contributors","subscribers_url":"https://api.github.com/repos/WanderlandTravelers/isso/subscribers","subscription_url":"https://api.github.com/repos/WanderlandTravelers/isso/subscription","commits_url":"https://api.github.com/repos/WanderlandTravelers/isso/commits{/sha}","git_commits_url":"https://api.github.com/repos/WanderlandTravelers/isso/git/commits{/sha}","comments_url":"https://api.github.com/repos/WanderlandTravelers/isso/comments{/number}","issue_comment_url":"https://api.github.com/repos/WanderlandTravelers/isso/issues/comments{/number}","contents_url":"https://api.github.com/repos/WanderlandTravelers/isso/contents/{+path}","compare_url":"https://api.github.com/repos/WanderlandTravelers/isso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WanderlandTravelers/isso/merges","archive_url":"https://api.github.com/repos/WanderlandTravelers/isso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WanderlandTravelers/isso/downloads","issues_url":"https://api.github.com/repos/WanderlandTravelers/isso/issues{/number}","pulls_url":"https://api.github.com/repos/WanderlandTravelers/isso/pulls{/number}","milestones_url":"https://api.github.com/repos/WanderlandTravelers/isso/milestones{/number}","notifications_url":"https://api.github.com/repos/WanderlandTravelers/isso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WanderlandTravelers/isso/labels{/name}","releases_url":"https://api.github.com/repos/WanderlandTravelers/isso/releases{/id}","deployments_url":"https://api.github.com/repos/WanderlandTravelers/isso/deployments","created_at":"2018-12-22T03:26:04Z","updated_at":"2018-12-27T01:52:22Z","pushed_at":"2018-12-27T01:53:17Z","git_url":"git://github.com/WanderlandTravelers/isso.git","ssh_url":"git@github.com:WanderlandTravelers/isso.git","clone_url":"https://github.com/WanderlandTravelers/isso.git","svn_url":"https://github.com/WanderlandTravelers/isso","homepage":"https://posativ.org/isso/","size":1991,"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,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"posativ:master","ref":"master","sha":"915c74dc1b5ad69fbd9320f12b610b5088ee3959","user":{"login":"posativ","id":337602,"node_id":"MDQ6VXNlcjMzNzYwMg==","avatar_url":"https://avatars2.githubusercontent.com/u/337602?v=4","gravatar_id":"","url":"https://api.github.com/users/posativ","html_url":"https://github.com/posativ","followers_url":"https://api.github.com/users/posativ/followers","following_url":"https://api.github.com/users/posativ/following{/other_user}","gists_url":"https://api.github.com/users/posativ/gists{/gist_id}","starred_url":"https://api.github.com/users/posativ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/posativ/subscriptions","organizations_url":"https://api.github.com/users/posativ/orgs","repos_url":"https://api.github.com/users/posativ/repos","events_url":"https://api.github.com/users/posativ/events{/privacy}","received_events_url":"https://api.github.com/users/posativ/received_events","type":"User","site_admin":false},"repo":{"id":6268419,"node_id":"MDEwOlJlcG9zaXRvcnk2MjY4NDE5","name":"isso","full_name":"posativ/isso","private":false,"owner":{"login":"posativ","id":337602,"node_id":"MDQ6VXNlcjMzNzYwMg==","avatar_url":"https://avatars2.githubusercontent.com/u/337602?v=4","gravatar_id":"","url":"https://api.github.com/users/posativ","html_url":"https://github.com/posativ","followers_url":"https://api.github.com/users/posativ/followers","following_url":"https://api.github.com/users/posativ/following{/other_user}","gists_url":"https://api.github.com/users/posativ/gists{/gist_id}","starred_url":"https://api.github.com/users/posativ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/posativ/subscriptions","organizations_url":"https://api.github.com/users/posativ/orgs","repos_url":"https://api.github.com/users/posativ/repos","events_url":"https://api.github.com/users/posativ/events{/privacy}","received_events_url":"https://api.github.com/users/posativ/received_events","type":"User","site_admin":false},"html_url":"https://github.com/posativ/isso","description":"a Disqus alternative","fork":false,"url":"https://api.github.com/repos/posativ/isso","forks_url":"https://api.github.com/repos/posativ/isso/forks","keys_url":"https://api.github.com/repos/posativ/isso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/posativ/isso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/posativ/isso/teams","hooks_url":"https://api.github.com/repos/posativ/isso/hooks","issue_events_url":"https://api.github.com/repos/posativ/isso/issues/events{/number}","events_url":"https://api.github.com/repos/posativ/isso/events","assignees_url":"https://api.github.com/repos/posativ/isso/assignees{/user}","branches_url":"https://api.github.com/repos/posativ/isso/branches{/branch}","tags_url":"https://api.github.com/repos/posativ/isso/tags","blobs_url":"https://api.github.com/repos/posativ/isso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/posativ/isso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/posativ/isso/git/refs{/sha}","trees_url":"https://api.github.com/repos/posativ/isso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/posativ/isso/statuses/{sha}","languages_url":"https://api.github.com/repos/posativ/isso/languages","stargazers_url":"https://api.github.com/repos/posativ/isso/stargazers","contributors_url":"https://api.github.com/repos/posativ/isso/contributors","subscribers_url":"https://api.github.com/repos/posativ/isso/subscribers","subscription_url":"https://api.github.com/repos/posativ/isso/subscription","commits_url":"https://api.github.com/repos/posativ/isso/commits{/sha}","git_commits_url":"https://api.github.com/repos/posativ/isso/git/commits{/sha}","comments_url":"https://api.github.com/repos/posativ/isso/comments{/number}","issue_comment_url":"https://api.github.com/repos/posativ/isso/issues/comments{/number}","contents_url":"https://api.github.com/repos/posativ/isso/contents/{+path}","compare_url":"https://api.github.com/repos/posativ/isso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/posativ/isso/merges","archive_url":"https://api.github.com/repos/posativ/isso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/posativ/isso/downloads","issues_url":"https://api.github.com/repos/posativ/isso/issues{/number}","pulls_url":"https://api.github.com/repos/posativ/isso/pulls{/number}","milestones_url":"https://api.github.com/repos/posativ/isso/milestones{/number}","notifications_url":"https://api.github.com/repos/posativ/isso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/posativ/isso/labels{/name}","releases_url":"https://api.github.com/repos/posativ/isso/releases{/id}","deployments_url":"https://api.github.com/repos/posativ/isso/deployments","created_at":"2012-10-17T20:46:45Z","updated_at":"2019-01-05T18:02:57Z","pushed_at":"2019-01-05T02:30:16Z","git_url":"git://github.com/posativ/isso.git","ssh_url":"git@github.com:posativ/isso.git","clone_url":"https://github.com/posativ/isso.git","svn_url":"https://github.com/posativ/isso","homepage":"https://posativ.org/isso/","size":1977,"stargazers_count":3476,"watchers_count":3476,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":308,"mirror_url":null,"archived":false,"open_issues_count":129,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":308,"open_issues":129,"watchers":3476,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/posativ/isso/pulls/516"},"html":{"href":"https://github.com/posativ/isso/pull/516"},"issue":{"href":"https://api.github.com/repos/posativ/isso/issues/516"},"comments":{"href":"https://api.github.com/repos/posativ/isso/issues/516/comments"},"review_comments":{"href":"https://api.github.com/repos/posativ/isso/pulls/516/comments"},"review_comment":{"href":"https://api.github.com/repos/posativ/isso/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/posativ/isso/pulls/516/commits"},"statuses":{"href":"https://api.github.com/repos/posativ/isso/statuses/a43982cc26f001fb715fdf674d990333c2f3cf3e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jelmer"}}