{"action":"created","comment":{"url":"https://api.github.com/repos/apartmentlist/resque-bus/pulls/comments/29531996","id":29531996,"diff_hunk":"@@ -29,12 +29,15 @@ def queuebus_redis\n \n             # Save the default Resque redis connection\n             default_redis = ::Resque.redis\n-            # Get Resque to generate the connection given the server definition\n-            ::Resque.redis = @queuebus_redis_url\n-            # Store the Redis namespace that Resque created...\n-            @queuebus_redis = ::Resque.redis\n-            # ...and restore the default.\n-            ::Resque.redis = default_redis\n+            begin\n+              # Get Resque to generate the connection given the server definition\n+              ::Resque.redis = @queuebus_redis_url\n+              # Store the Redis namespace that Resque created...\n+              @queuebus_redis = ::Resque.redis\n+            ensure","path":"lib/resque_bus/adapter.rb","position":15,"original_position":15,"commit_id":"dcfbd4cec9dfa9377c4cfb0887b8dde64f2ff681","original_commit_id":"dcfbd4cec9dfa9377c4cfb0887b8dde64f2ff681","user":{"login":"ryanscott","id":12954,"avatar_url":"https://avatars.githubusercontent.com/u/12954?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanscott","html_url":"https://github.com/ryanscott","followers_url":"https://api.github.com/users/ryanscott/followers","following_url":"https://api.github.com/users/ryanscott/following{/other_user}","gists_url":"https://api.github.com/users/ryanscott/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanscott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanscott/subscriptions","organizations_url":"https://api.github.com/users/ryanscott/orgs","repos_url":"https://api.github.com/users/ryanscott/repos","events_url":"https://api.github.com/users/ryanscott/events{/privacy}","received_events_url":"https://api.github.com/users/ryanscott/received_events","type":"User","site_admin":false},"body":"it seems like this would be a good case to TDD, to see if we can find a case that breaks this (and thus requires the ensure)","created_at":"2015-05-01T20:41:11Z","updated_at":"2015-05-01T20:41:11Z","html_url":"https://github.com/apartmentlist/resque-bus/pull/6#discussion_r29531996","pull_request_url":"https://api.github.com/repos/apartmentlist/resque-bus/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/apartmentlist/resque-bus/pulls/comments/29531996"},"html":{"href":"https://github.com/apartmentlist/resque-bus/pull/6#discussion_r29531996"},"pull_request":{"href":"https://api.github.com/repos/apartmentlist/resque-bus/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/apartmentlist/resque-bus/pulls/6","id":34550357,"html_url":"https://github.com/apartmentlist/resque-bus/pull/6","diff_url":"https://github.com/apartmentlist/resque-bus/pull/6.diff","patch_url":"https://github.com/apartmentlist/resque-bus/pull/6.patch","issue_url":"https://api.github.com/repos/apartmentlist/resque-bus/issues/6","number":6,"state":"open","locked":false,"title":"Ensure Resque Redis instance gets restored in all cases","user":{"login":"rpdillon","id":6383,"avatar_url":"https://avatars.githubusercontent.com/u/6383?v=3","gravatar_id":"","url":"https://api.github.com/users/rpdillon","html_url":"https://github.com/rpdillon","followers_url":"https://api.github.com/users/rpdillon/followers","following_url":"https://api.github.com/users/rpdillon/following{/other_user}","gists_url":"https://api.github.com/users/rpdillon/gists{/gist_id}","starred_url":"https://api.github.com/users/rpdillon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpdillon/subscriptions","organizations_url":"https://api.github.com/users/rpdillon/orgs","repos_url":"https://api.github.com/users/rpdillon/repos","events_url":"https://api.github.com/users/rpdillon/events{/privacy}","received_events_url":"https://api.github.com/users/rpdillon/received_events","type":"User","site_admin":false},"body":"Based on feedback from upstream PR.\r\n\r\nhttps://github.com/queue-bus/resque-bus/pull/3/files\r\n\r\n@ryanscott ","created_at":"2015-05-01T17:03:48Z","updated_at":"2015-05-01T20:41:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"65b56a63cd487dce2b6bb4976f4fa81b80e66494","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apartmentlist/resque-bus/pulls/6/commits","review_comments_url":"https://api.github.com/repos/apartmentlist/resque-bus/pulls/6/comments","review_comment_url":"https://api.github.com/repos/apartmentlist/resque-bus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apartmentlist/resque-bus/issues/6/comments","statuses_url":"https://api.github.com/repos/apartmentlist/resque-bus/statuses/dcfbd4cec9dfa9377c4cfb0887b8dde64f2ff681","head":{"label":"apartmentlist:upstream-prep","ref":"upstream-prep","sha":"dcfbd4cec9dfa9377c4cfb0887b8dde64f2ff681","user":{"login":"apartmentlist","id":928486,"avatar_url":"https://avatars.githubusercontent.com/u/928486?v=3","gravatar_id":"","url":"https://api.github.com/users/apartmentlist","html_url":"https://github.com/apartmentlist","followers_url":"https://api.github.com/users/apartmentlist/followers","following_url":"https://api.github.com/users/apartmentlist/following{/other_user}","gists_url":"https://api.github.com/users/apartmentlist/gists{/gist_id}","starred_url":"https://api.github.com/users/apartmentlist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apartmentlist/subscriptions","organizations_url":"https://api.github.com/users/apartmentlist/orgs","repos_url":"https://api.github.com/users/apartmentlist/repos","events_url":"https://api.github.com/users/apartmentlist/events{/privacy}","received_events_url":"https://api.github.com/users/apartmentlist/received_events","type":"Organization","site_admin":false},"repo":{"id":33687563,"name":"resque-bus","full_name":"apartmentlist/resque-bus","owner":{"login":"apartmentlist","id":928486,"avatar_url":"https://avatars.githubusercontent.com/u/928486?v=3","gravatar_id":"","url":"https://api.github.com/users/apartmentlist","html_url":"https://github.com/apartmentlist","followers_url":"https://api.github.com/users/apartmentlist/followers","following_url":"https://api.github.com/users/apartmentlist/following{/other_user}","gists_url":"https://api.github.com/users/apartmentlist/gists{/gist_id}","starred_url":"https://api.github.com/users/apartmentlist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apartmentlist/subscriptions","organizations_url":"https://api.github.com/users/apartmentlist/orgs","repos_url":"https://api.github.com/users/apartmentlist/repos","events_url":"https://api.github.com/users/apartmentlist/events{/privacy}","received_events_url":"https://api.github.com/users/apartmentlist/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apartmentlist/resque-bus","description":"Message bus via the Resque workers you're already using.","fork":true,"url":"https://api.github.com/repos/apartmentlist/resque-bus","forks_url":"https://api.github.com/repos/apartmentlist/resque-bus/forks","keys_url":"https://api.github.com/repos/apartmentlist/resque-bus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apartmentlist/resque-bus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apartmentlist/resque-bus/teams","hooks_url":"https://api.github.com/repos/apartmentlist/resque-bus/hooks","issue_events_url":"https://api.github.com/repos/apartmentlist/resque-bus/issues/events{/number}","events_url":"https://api.github.com/repos/apartmentlist/resque-bus/events","assignees_url":"https://api.github.com/repos/apartmentlist/resque-bus/assignees{/user}","branches_url":"https://api.github.com/repos/apartmentlist/resque-bus/branches{/branch}","tags_url":"https://api.github.com/repos/apartmentlist/resque-bus/tags","blobs_url":"https://api.github.com/repos/apartmentlist/resque-bus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apartmentlist/resque-bus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apartmentlist/resque-bus/git/refs{/sha}","trees_url":"https://api.github.com/repos/apartmentlist/resque-bus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apartmentlist/resque-bus/statuses/{sha}","languages_url":"https://api.github.com/repos/apartmentlist/resque-bus/languages","stargazers_url":"https://api.github.com/repos/apartmentlist/resque-bus/stargazers","contributors_url":"https://api.github.com/repos/apartmentlist/resque-bus/contributors","subscribers_url":"https://api.github.com/repos/apartmentlist/resque-bus/subscribers","subscription_url":"https://api.github.com/repos/apartmentlist/resque-bus/subscription","commits_url":"https://api.github.com/repos/apartmentlist/resque-bus/commits{/sha}","git_commits_url":"https://api.github.com/repos/apartmentlist/resque-bus/git/commits{/sha}","comments_url":"https://api.github.com/repos/apartmentlist/resque-bus/comments{/number}","issue_comment_url":"https://api.github.com/repos/apartmentlist/resque-bus/issues/comments{/number}","contents_url":"https://api.github.com/repos/apartmentlist/resque-bus/contents/{+path}","compare_url":"https://api.github.com/repos/apartmentlist/resque-bus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apartmentlist/resque-bus/merges","archive_url":"https://api.github.com/repos/apartmentlist/resque-bus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apartmentlist/resque-bus/downloads","issues_url":"https://api.github.com/repos/apartmentlist/resque-bus/issues{/number}","pulls_url":"https://api.github.com/repos/apartmentlist/resque-bus/pulls{/number}","milestones_url":"https://api.github.com/repos/apartmentlist/resque-bus/milestones{/number}","notifications_url":"https://api.github.com/repos/apartmentlist/resque-bus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apartmentlist/resque-bus/labels{/name}","releases_url":"https://api.github.com/repos/apartmentlist/resque-bus/releases{/id}","created_at":"2015-04-09T19:14:21Z","updated_at":"2015-05-01T16:40:54Z","pushed_at":"2015-05-01T17:04:12Z","git_url":"git://github.com/apartmentlist/resque-bus.git","ssh_url":"git@github.com:apartmentlist/resque-bus.git","clone_url":"https://github.com/apartmentlist/resque-bus.git","svn_url":"https://github.com/apartmentlist/resque-bus","homepage":"","size":415,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"apartmentlist:master","ref":"master","sha":"ddd91b214d9ce0d869caa59ef023c843bbf19654","user":{"login":"apartmentlist","id":928486,"avatar_url":"https://avatars.githubusercontent.com/u/928486?v=3","gravatar_id":"","url":"https://api.github.com/users/apartmentlist","html_url":"https://github.com/apartmentlist","followers_url":"https://api.github.com/users/apartmentlist/followers","following_url":"https://api.github.com/users/apartmentlist/following{/other_user}","gists_url":"https://api.github.com/users/apartmentlist/gists{/gist_id}","starred_url":"https://api.github.com/users/apartmentlist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apartmentlist/subscriptions","organizations_url":"https://api.github.com/users/apartmentlist/orgs","repos_url":"https://api.github.com/users/apartmentlist/repos","events_url":"https://api.github.com/users/apartmentlist/events{/privacy}","received_events_url":"https://api.github.com/users/apartmentlist/received_events","type":"Organization","site_admin":false},"repo":{"id":33687563,"name":"resque-bus","full_name":"apartmentlist/resque-bus","owner":{"login":"apartmentlist","id":928486,"avatar_url":"https://avatars.githubusercontent.com/u/928486?v=3","gravatar_id":"","url":"https://api.github.com/users/apartmentlist","html_url":"https://github.com/apartmentlist","followers_url":"https://api.github.com/users/apartmentlist/followers","following_url":"https://api.github.com/users/apartmentlist/following{/other_user}","gists_url":"https://api.github.com/users/apartmentlist/gists{/gist_id}","starred_url":"https://api.github.com/users/apartmentlist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apartmentlist/subscriptions","organizations_url":"https://api.github.com/users/apartmentlist/orgs","repos_url":"https://api.github.com/users/apartmentlist/repos","events_url":"https://api.github.com/users/apartmentlist/events{/privacy}","received_events_url":"https://api.github.com/users/apartmentlist/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apartmentlist/resque-bus","description":"Message bus via the Resque workers you're already using.","fork":true,"url":"https://api.github.com/repos/apartmentlist/resque-bus","forks_url":"https://api.github.com/repos/apartmentlist/resque-bus/forks","keys_url":"https://api.github.com/repos/apartmentlist/resque-bus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apartmentlist/resque-bus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apartmentlist/resque-bus/teams","hooks_url":"https://api.github.com/repos/apartmentlist/resque-bus/hooks","issue_events_url":"https://api.github.com/repos/apartmentlist/resque-bus/issues/events{/number}","events_url":"https://api.github.com/repos/apartmentlist/resque-bus/events","assignees_url":"https://api.github.com/repos/apartmentlist/resque-bus/assignees{/user}","branches_url":"https://api.github.com/repos/apartmentlist/resque-bus/branches{/branch}","tags_url":"https://api.github.com/repos/apartmentlist/resque-bus/tags","blobs_url":"https://api.github.com/repos/apartmentlist/resque-bus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apartmentlist/resque-bus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apartmentlist/resque-bus/git/refs{/sha}","trees_url":"https://api.github.com/repos/apartmentlist/resque-bus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apartmentlist/resque-bus/statuses/{sha}","languages_url":"https://api.github.com/repos/apartmentlist/resque-bus/languages","stargazers_url":"https://api.github.com/repos/apartmentlist/resque-bus/stargazers","contributors_url":"https://api.github.com/repos/apartmentlist/resque-bus/contributors","subscribers_url":"https://api.github.com/repos/apartmentlist/resque-bus/subscribers","subscription_url":"https://api.github.com/repos/apartmentlist/resque-bus/subscription","commits_url":"https://api.github.com/repos/apartmentlist/resque-bus/commits{/sha}","git_commits_url":"https://api.github.com/repos/apartmentlist/resque-bus/git/commits{/sha}","comments_url":"https://api.github.com/repos/apartmentlist/resque-bus/comments{/number}","issue_comment_url":"https://api.github.com/repos/apartmentlist/resque-bus/issues/comments{/number}","contents_url":"https://api.github.com/repos/apartmentlist/resque-bus/contents/{+path}","compare_url":"https://api.github.com/repos/apartmentlist/resque-bus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apartmentlist/resque-bus/merges","archive_url":"https://api.github.com/repos/apartmentlist/resque-bus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apartmentlist/resque-bus/downloads","issues_url":"https://api.github.com/repos/apartmentlist/resque-bus/issues{/number}","pulls_url":"https://api.github.com/repos/apartmentlist/resque-bus/pulls{/number}","milestones_url":"https://api.github.com/repos/apartmentlist/resque-bus/milestones{/number}","notifications_url":"https://api.github.com/repos/apartmentlist/resque-bus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apartmentlist/resque-bus/labels{/name}","releases_url":"https://api.github.com/repos/apartmentlist/resque-bus/releases{/id}","created_at":"2015-04-09T19:14:21Z","updated_at":"2015-05-01T16:40:54Z","pushed_at":"2015-05-01T17:04:12Z","git_url":"git://github.com/apartmentlist/resque-bus.git","ssh_url":"git@github.com:apartmentlist/resque-bus.git","clone_url":"https://github.com/apartmentlist/resque-bus.git","svn_url":"https://github.com/apartmentlist/resque-bus","homepage":"","size":415,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apartmentlist/resque-bus/pulls/6"},"html":{"href":"https://github.com/apartmentlist/resque-bus/pull/6"},"issue":{"href":"https://api.github.com/repos/apartmentlist/resque-bus/issues/6"},"comments":{"href":"https://api.github.com/repos/apartmentlist/resque-bus/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/apartmentlist/resque-bus/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/apartmentlist/resque-bus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apartmentlist/resque-bus/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/apartmentlist/resque-bus/statuses/dcfbd4cec9dfa9377c4cfb0887b8dde64f2ff681"}}}}