{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/webpay/pulls/comments/41837085","id":41837085,"diff_hunk":"@@ -105,6 +102,10 @@ def configure_transaction(request, trans=None, mcc=None, mnc=None):\n                     request.session['uuid'],\n                     [p.name for p in providers])\n \n+    # Now that the background task has been started successfully,\n+    # prevent configuration from running twice.\n+    request.session['configured_trans'] = request.session['trans_id']","path":"webpay/pay/tasks.py","position":16,"original_position":16,"commit_id":"ce6751c247a87f6c7bf5e29cd4662d1137373713","original_commit_id":"ce6751c247a87f6c7bf5e29cd4662d1137373713","user":{"login":"muffinresearch","id":1514,"avatar_url":"https://avatars.githubusercontent.com/u/1514?v=3","gravatar_id":"","url":"https://api.github.com/users/muffinresearch","html_url":"https://github.com/muffinresearch","followers_url":"https://api.github.com/users/muffinresearch/followers","following_url":"https://api.github.com/users/muffinresearch/following{/other_user}","gists_url":"https://api.github.com/users/muffinresearch/gists{/gist_id}","starred_url":"https://api.github.com/users/muffinresearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muffinresearch/subscriptions","organizations_url":"https://api.github.com/users/muffinresearch/orgs","repos_url":"https://api.github.com/users/muffinresearch/repos","events_url":"https://api.github.com/users/muffinresearch/events{/privacy}","received_events_url":"https://api.github.com/users/muffinresearch/received_events","type":"User","site_admin":false},"body":"So if I've understood this correctly start_pay.delay blocks?","created_at":"2015-10-13T08:04:01Z","updated_at":"2015-10-13T08:04:01Z","html_url":"https://github.com/mozilla/webpay/pull/642#discussion_r41837085","pull_request_url":"https://api.github.com/repos/mozilla/webpay/pulls/642","_links":{"self":{"href":"https://api.github.com/repos/mozilla/webpay/pulls/comments/41837085"},"html":{"href":"https://github.com/mozilla/webpay/pull/642#discussion_r41837085"},"pull_request":{"href":"https://api.github.com/repos/mozilla/webpay/pulls/642"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/webpay/pulls/642","id":47458594,"html_url":"https://github.com/mozilla/webpay/pull/642","diff_url":"https://github.com/mozilla/webpay/pull/642.diff","patch_url":"https://github.com/mozilla/webpay/pull/642.patch","issue_url":"https://api.github.com/repos/mozilla/webpay/issues/642","number":642,"state":"open","locked":false,"title":"Fix session to retry failed trans. (bug 1213978)","user":{"login":"kumar303","id":55398,"avatar_url":"https://avatars.githubusercontent.com/u/55398?v=3","gravatar_id":"","url":"https://api.github.com/users/kumar303","html_url":"https://github.com/kumar303","followers_url":"https://api.github.com/users/kumar303/followers","following_url":"https://api.github.com/users/kumar303/following{/other_user}","gists_url":"https://api.github.com/users/kumar303/gists{/gist_id}","starred_url":"https://api.github.com/users/kumar303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumar303/subscriptions","organizations_url":"https://api.github.com/users/kumar303/orgs","repos_url":"https://api.github.com/users/kumar303/repos","events_url":"https://api.github.com/users/kumar303/events{/privacy}","received_events_url":"https://api.github.com/users/kumar303/received_events","type":"User","site_admin":false},"body":"In case we lose the connection to RabbitMQ/celery (which will raise an exception), we don't want to store the 'already configured' flag in the session.\r\nI'm not 100% sure that sessions are preserved in 500 errors but maybe they are.\r\nIf so, this would fix an issue I see where stale transaction IDs are hanging around in people's sessions even after the RabbitMQ issues have been resolved.","created_at":"2015-10-12T20:03:00Z","updated_at":"2015-10-13T08:04:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e5c45e88f04a2a27b52dde8bbd92415fb4137dec","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/webpay/pulls/642/commits","review_comments_url":"https://api.github.com/repos/mozilla/webpay/pulls/642/comments","review_comment_url":"https://api.github.com/repos/mozilla/webpay/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/webpay/issues/642/comments","statuses_url":"https://api.github.com/repos/mozilla/webpay/statuses/ce6751c247a87f6c7bf5e29cd4662d1137373713","head":{"label":"kumar303:retry","ref":"retry","sha":"ce6751c247a87f6c7bf5e29cd4662d1137373713","user":{"login":"kumar303","id":55398,"avatar_url":"https://avatars.githubusercontent.com/u/55398?v=3","gravatar_id":"","url":"https://api.github.com/users/kumar303","html_url":"https://github.com/kumar303","followers_url":"https://api.github.com/users/kumar303/followers","following_url":"https://api.github.com/users/kumar303/following{/other_user}","gists_url":"https://api.github.com/users/kumar303/gists{/gist_id}","starred_url":"https://api.github.com/users/kumar303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumar303/subscriptions","organizations_url":"https://api.github.com/users/kumar303/orgs","repos_url":"https://api.github.com/users/kumar303/repos","events_url":"https://api.github.com/users/kumar303/events{/privacy}","received_events_url":"https://api.github.com/users/kumar303/received_events","type":"User","site_admin":false},"repo":{"id":6095566,"name":"webpay","full_name":"kumar303/webpay","owner":{"login":"kumar303","id":55398,"avatar_url":"https://avatars.githubusercontent.com/u/55398?v=3","gravatar_id":"","url":"https://api.github.com/users/kumar303","html_url":"https://github.com/kumar303","followers_url":"https://api.github.com/users/kumar303/followers","following_url":"https://api.github.com/users/kumar303/following{/other_user}","gists_url":"https://api.github.com/users/kumar303/gists{/gist_id}","starred_url":"https://api.github.com/users/kumar303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumar303/subscriptions","organizations_url":"https://api.github.com/users/kumar303/orgs","repos_url":"https://api.github.com/users/kumar303/repos","events_url":"https://api.github.com/users/kumar303/events{/privacy}","received_events_url":"https://api.github.com/users/kumar303/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kumar303/webpay","description":"","fork":true,"url":"https://api.github.com/repos/kumar303/webpay","forks_url":"https://api.github.com/repos/kumar303/webpay/forks","keys_url":"https://api.github.com/repos/kumar303/webpay/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kumar303/webpay/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kumar303/webpay/teams","hooks_url":"https://api.github.com/repos/kumar303/webpay/hooks","issue_events_url":"https://api.github.com/repos/kumar303/webpay/issues/events{/number}","events_url":"https://api.github.com/repos/kumar303/webpay/events","assignees_url":"https://api.github.com/repos/kumar303/webpay/assignees{/user}","branches_url":"https://api.github.com/repos/kumar303/webpay/branches{/branch}","tags_url":"https://api.github.com/repos/kumar303/webpay/tags","blobs_url":"https://api.github.com/repos/kumar303/webpay/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kumar303/webpay/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kumar303/webpay/git/refs{/sha}","trees_url":"https://api.github.com/repos/kumar303/webpay/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kumar303/webpay/statuses/{sha}","languages_url":"https://api.github.com/repos/kumar303/webpay/languages","stargazers_url":"https://api.github.com/repos/kumar303/webpay/stargazers","contributors_url":"https://api.github.com/repos/kumar303/webpay/contributors","subscribers_url":"https://api.github.com/repos/kumar303/webpay/subscribers","subscription_url":"https://api.github.com/repos/kumar303/webpay/subscription","commits_url":"https://api.github.com/repos/kumar303/webpay/commits{/sha}","git_commits_url":"https://api.github.com/repos/kumar303/webpay/git/commits{/sha}","comments_url":"https://api.github.com/repos/kumar303/webpay/comments{/number}","issue_comment_url":"https://api.github.com/repos/kumar303/webpay/issues/comments{/number}","contents_url":"https://api.github.com/repos/kumar303/webpay/contents/{+path}","compare_url":"https://api.github.com/repos/kumar303/webpay/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kumar303/webpay/merges","archive_url":"https://api.github.com/repos/kumar303/webpay/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kumar303/webpay/downloads","issues_url":"https://api.github.com/repos/kumar303/webpay/issues{/number}","pulls_url":"https://api.github.com/repos/kumar303/webpay/pulls{/number}","milestones_url":"https://api.github.com/repos/kumar303/webpay/milestones{/number}","notifications_url":"https://api.github.com/repos/kumar303/webpay/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kumar303/webpay/labels{/name}","releases_url":"https://api.github.com/repos/kumar303/webpay/releases{/id}","created_at":"2012-10-05T19:37:32Z","updated_at":"2015-04-28T21:51:19Z","pushed_at":"2015-10-12T20:01:52Z","git_url":"git://github.com/kumar303/webpay.git","ssh_url":"git@github.com:kumar303/webpay.git","clone_url":"https://github.com/kumar303/webpay.git","svn_url":"https://github.com/kumar303/webpay","homepage":null,"size":15069,"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":"mozilla:master","ref":"master","sha":"609e8febd8cef1cd7207162b529e75c8376a1b63","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":6037696,"name":"webpay","full_name":"mozilla/webpay","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/webpay","description":"Webpay is an implementation of the WebPaymentProvider spec","fork":false,"url":"https://api.github.com/repos/mozilla/webpay","forks_url":"https://api.github.com/repos/mozilla/webpay/forks","keys_url":"https://api.github.com/repos/mozilla/webpay/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/webpay/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/webpay/teams","hooks_url":"https://api.github.com/repos/mozilla/webpay/hooks","issue_events_url":"https://api.github.com/repos/mozilla/webpay/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/webpay/events","assignees_url":"https://api.github.com/repos/mozilla/webpay/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/webpay/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/webpay/tags","blobs_url":"https://api.github.com/repos/mozilla/webpay/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/webpay/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/webpay/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/webpay/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/webpay/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/webpay/languages","stargazers_url":"https://api.github.com/repos/mozilla/webpay/stargazers","contributors_url":"https://api.github.com/repos/mozilla/webpay/contributors","subscribers_url":"https://api.github.com/repos/mozilla/webpay/subscribers","subscription_url":"https://api.github.com/repos/mozilla/webpay/subscription","commits_url":"https://api.github.com/repos/mozilla/webpay/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/webpay/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/webpay/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/webpay/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/webpay/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/webpay/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/webpay/merges","archive_url":"https://api.github.com/repos/mozilla/webpay/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/webpay/downloads","issues_url":"https://api.github.com/repos/mozilla/webpay/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/webpay/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/webpay/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/webpay/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/webpay/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/webpay/releases{/id}","created_at":"2012-10-01T23:10:24Z","updated_at":"2015-07-07T11:57:33Z","pushed_at":"2015-10-12T20:03:00Z","git_url":"git://github.com/mozilla/webpay.git","ssh_url":"git@github.com:mozilla/webpay.git","clone_url":"https://github.com/mozilla/webpay.git","svn_url":"https://github.com/mozilla/webpay","homepage":"","size":63574,"stargazers_count":41,"watchers_count":41,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":62,"mirror_url":null,"open_issues_count":5,"forks":62,"open_issues":5,"watchers":41,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/webpay/pulls/642"},"html":{"href":"https://github.com/mozilla/webpay/pull/642"},"issue":{"href":"https://api.github.com/repos/mozilla/webpay/issues/642"},"comments":{"href":"https://api.github.com/repos/mozilla/webpay/issues/642/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/webpay/pulls/642/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/webpay/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/webpay/pulls/642/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/webpay/statuses/ce6751c247a87f6c7bf5e29cd4662d1137373713"}}}}