{"action":"closed","number":1485,"pull_request":{"url":"https://api.github.com/repos/resque/resque/pulls/1485","id":76088250,"html_url":"https://github.com/resque/resque/pull/1485","diff_url":"https://github.com/resque/resque/pull/1485.diff","patch_url":"https://github.com/resque/resque/pull/1485.patch","issue_url":"https://api.github.com/repos/resque/resque/issues/1485","number":1485,"state":"closed","locked":false,"title":"[bugfix] Remove heartbeat when unregistering worker","user":{"login":"fw42","id":2072686,"avatar_url":"https://avatars.githubusercontent.com/u/2072686?v=3","gravatar_id":"","url":"https://api.github.com/users/fw42","html_url":"https://github.com/fw42","followers_url":"https://api.github.com/users/fw42/followers","following_url":"https://api.github.com/users/fw42/following{/other_user}","gists_url":"https://api.github.com/users/fw42/gists{/gist_id}","starred_url":"https://api.github.com/users/fw42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fw42/subscriptions","organizations_url":"https://api.github.com/users/fw42/orgs","repos_url":"https://api.github.com/users/fw42/repos","events_url":"https://api.github.com/users/fw42/events{/privacy}","received_events_url":"https://api.github.com/users/fw42/received_events","type":"User","site_admin":false},"body":"This fixes a bug that was introduced in https://github.com/resque/resque/commit/4bb44413a045fca78d25e22ad535b3f5ea97fab8 where old heartbeats would no longer get cleaned up when a worker is being shut down. By itself, this is not a big deal, but in combination with https://github.com/resque/resque/pull/1479, it can lead to a race condition where workers that re-use previous worker ids (because hostname+pid+queues happen to match those of a previous worker) get pruned.\r\n\r\nAlso move all the heartbeat methods to the DataStore class.\r\n\r\n@dylanahsmith @Sirupsen ","created_at":"2016-07-03T12:45:17Z","updated_at":"2016-07-05T12:15:00Z","closed_at":"2016-07-05T12:15:00Z","merged_at":"2016-07-05T12:15:00Z","merge_commit_sha":"f2c97b24689bd68926d224360955afd71f482405","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/resque/resque/pulls/1485/commits","review_comments_url":"https://api.github.com/repos/resque/resque/pulls/1485/comments","review_comment_url":"https://api.github.com/repos/resque/resque/pulls/comments{/number}","comments_url":"https://api.github.com/repos/resque/resque/issues/1485/comments","statuses_url":"https://api.github.com/repos/resque/resque/statuses/47bce253ebc23df93329de4979392a065b701b3b","head":{"label":"Shopify:fix-remove-heartbeat-when-unregistering-worker","ref":"fix-remove-heartbeat-when-unregistering-worker","sha":"47bce253ebc23df93329de4979392a065b701b3b","user":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"repo":{"id":19742633,"name":"resque","full_name":"Shopify/resque","owner":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Shopify/resque","description":"Resque is a Redis-backed Ruby library for creating background jobs, placing them on multiple queues, and processing them later.","fork":true,"url":"https://api.github.com/repos/Shopify/resque","forks_url":"https://api.github.com/repos/Shopify/resque/forks","keys_url":"https://api.github.com/repos/Shopify/resque/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shopify/resque/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shopify/resque/teams","hooks_url":"https://api.github.com/repos/Shopify/resque/hooks","issue_events_url":"https://api.github.com/repos/Shopify/resque/issues/events{/number}","events_url":"https://api.github.com/repos/Shopify/resque/events","assignees_url":"https://api.github.com/repos/Shopify/resque/assignees{/user}","branches_url":"https://api.github.com/repos/Shopify/resque/branches{/branch}","tags_url":"https://api.github.com/repos/Shopify/resque/tags","blobs_url":"https://api.github.com/repos/Shopify/resque/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shopify/resque/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shopify/resque/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shopify/resque/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shopify/resque/statuses/{sha}","languages_url":"https://api.github.com/repos/Shopify/resque/languages","stargazers_url":"https://api.github.com/repos/Shopify/resque/stargazers","contributors_url":"https://api.github.com/repos/Shopify/resque/contributors","subscribers_url":"https://api.github.com/repos/Shopify/resque/subscribers","subscription_url":"https://api.github.com/repos/Shopify/resque/subscription","commits_url":"https://api.github.com/repos/Shopify/resque/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shopify/resque/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shopify/resque/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shopify/resque/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shopify/resque/contents/{+path}","compare_url":"https://api.github.com/repos/Shopify/resque/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shopify/resque/merges","archive_url":"https://api.github.com/repos/Shopify/resque/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shopify/resque/downloads","issues_url":"https://api.github.com/repos/Shopify/resque/issues{/number}","pulls_url":"https://api.github.com/repos/Shopify/resque/pulls{/number}","milestones_url":"https://api.github.com/repos/Shopify/resque/milestones{/number}","notifications_url":"https://api.github.com/repos/Shopify/resque/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shopify/resque/labels{/name}","releases_url":"https://api.github.com/repos/Shopify/resque/releases{/id}","deployments_url":"https://api.github.com/repos/Shopify/resque/deployments","created_at":"2014-05-13T14:37:55Z","updated_at":"2016-02-09T01:28:29Z","pushed_at":"2016-07-05T12:10:30Z","git_url":"git://github.com/Shopify/resque.git","ssh_url":"git@github.com:Shopify/resque.git","clone_url":"https://github.com/Shopify/resque.git","svn_url":"https://github.com/Shopify/resque","homepage":"http://github.com/blog/542-introducing-resque","size":1825,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"resque:master","ref":"master","sha":"06036388ec61e573c761ac5a25a2ef3c76537ec7","user":{"login":"resque","id":3876747,"avatar_url":"https://avatars.githubusercontent.com/u/3876747?v=3","gravatar_id":"","url":"https://api.github.com/users/resque","html_url":"https://github.com/resque","followers_url":"https://api.github.com/users/resque/followers","following_url":"https://api.github.com/users/resque/following{/other_user}","gists_url":"https://api.github.com/users/resque/gists{/gist_id}","starred_url":"https://api.github.com/users/resque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resque/subscriptions","organizations_url":"https://api.github.com/users/resque/orgs","repos_url":"https://api.github.com/users/resque/repos","events_url":"https://api.github.com/users/resque/events{/privacy}","received_events_url":"https://api.github.com/users/resque/received_events","type":"Organization","site_admin":false},"repo":{"id":275604,"name":"resque","full_name":"resque/resque","owner":{"login":"resque","id":3876747,"avatar_url":"https://avatars.githubusercontent.com/u/3876747?v=3","gravatar_id":"","url":"https://api.github.com/users/resque","html_url":"https://github.com/resque","followers_url":"https://api.github.com/users/resque/followers","following_url":"https://api.github.com/users/resque/following{/other_user}","gists_url":"https://api.github.com/users/resque/gists{/gist_id}","starred_url":"https://api.github.com/users/resque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resque/subscriptions","organizations_url":"https://api.github.com/users/resque/orgs","repos_url":"https://api.github.com/users/resque/repos","events_url":"https://api.github.com/users/resque/events{/privacy}","received_events_url":"https://api.github.com/users/resque/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/resque/resque","description":"Resque is a Redis-backed Ruby library for creating background jobs, placing them on multiple queues, and processing them later.","fork":false,"url":"https://api.github.com/repos/resque/resque","forks_url":"https://api.github.com/repos/resque/resque/forks","keys_url":"https://api.github.com/repos/resque/resque/keys{/key_id}","collaborators_url":"https://api.github.com/repos/resque/resque/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/resque/resque/teams","hooks_url":"https://api.github.com/repos/resque/resque/hooks","issue_events_url":"https://api.github.com/repos/resque/resque/issues/events{/number}","events_url":"https://api.github.com/repos/resque/resque/events","assignees_url":"https://api.github.com/repos/resque/resque/assignees{/user}","branches_url":"https://api.github.com/repos/resque/resque/branches{/branch}","tags_url":"https://api.github.com/repos/resque/resque/tags","blobs_url":"https://api.github.com/repos/resque/resque/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/resque/resque/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/resque/resque/git/refs{/sha}","trees_url":"https://api.github.com/repos/resque/resque/git/trees{/sha}","statuses_url":"https://api.github.com/repos/resque/resque/statuses/{sha}","languages_url":"https://api.github.com/repos/resque/resque/languages","stargazers_url":"https://api.github.com/repos/resque/resque/stargazers","contributors_url":"https://api.github.com/repos/resque/resque/contributors","subscribers_url":"https://api.github.com/repos/resque/resque/subscribers","subscription_url":"https://api.github.com/repos/resque/resque/subscription","commits_url":"https://api.github.com/repos/resque/resque/commits{/sha}","git_commits_url":"https://api.github.com/repos/resque/resque/git/commits{/sha}","comments_url":"https://api.github.com/repos/resque/resque/comments{/number}","issue_comment_url":"https://api.github.com/repos/resque/resque/issues/comments{/number}","contents_url":"https://api.github.com/repos/resque/resque/contents/{+path}","compare_url":"https://api.github.com/repos/resque/resque/compare/{base}...{head}","merges_url":"https://api.github.com/repos/resque/resque/merges","archive_url":"https://api.github.com/repos/resque/resque/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/resque/resque/downloads","issues_url":"https://api.github.com/repos/resque/resque/issues{/number}","pulls_url":"https://api.github.com/repos/resque/resque/pulls{/number}","milestones_url":"https://api.github.com/repos/resque/resque/milestones{/number}","notifications_url":"https://api.github.com/repos/resque/resque/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/resque/resque/labels{/name}","releases_url":"https://api.github.com/repos/resque/resque/releases{/id}","deployments_url":"https://api.github.com/repos/resque/resque/deployments","created_at":"2009-08-12T00:27:35Z","updated_at":"2016-07-05T09:18:17Z","pushed_at":"2016-07-05T12:15:00Z","git_url":"git://github.com/resque/resque.git","ssh_url":"git@github.com:resque/resque.git","clone_url":"https://github.com/resque/resque.git","svn_url":"https://github.com/resque/resque","homepage":"http://resque.github.io/","size":6164,"stargazers_count":7362,"watchers_count":7362,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":1381,"mirror_url":null,"open_issues_count":46,"forks":1381,"open_issues":46,"watchers":7362,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/resque/resque/pulls/1485"},"html":{"href":"https://github.com/resque/resque/pull/1485"},"issue":{"href":"https://api.github.com/repos/resque/resque/issues/1485"},"comments":{"href":"https://api.github.com/repos/resque/resque/issues/1485/comments"},"review_comments":{"href":"https://api.github.com/repos/resque/resque/pulls/1485/comments"},"review_comment":{"href":"https://api.github.com/repos/resque/resque/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/resque/resque/pulls/1485/commits"},"statuses":{"href":"https://api.github.com/repos/resque/resque/statuses/47bce253ebc23df93329de4979392a065b701b3b"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"fw42","id":2072686,"avatar_url":"https://avatars.githubusercontent.com/u/2072686?v=3","gravatar_id":"","url":"https://api.github.com/users/fw42","html_url":"https://github.com/fw42","followers_url":"https://api.github.com/users/fw42/followers","following_url":"https://api.github.com/users/fw42/following{/other_user}","gists_url":"https://api.github.com/users/fw42/gists{/gist_id}","starred_url":"https://api.github.com/users/fw42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fw42/subscriptions","organizations_url":"https://api.github.com/users/fw42/orgs","repos_url":"https://api.github.com/users/fw42/repos","events_url":"https://api.github.com/users/fw42/events{/privacy}","received_events_url":"https://api.github.com/users/fw42/received_events","type":"User","site_admin":false},"comments":3,"review_comments":1,"commits":1,"additions":54,"deletions":21,"changed_files":3}}
{"actor":{"display_login":"fw42"}}