{"action":"created","comment":{"url":"https://api.github.com/repos/lantins/resque-retry/pulls/comments/40823692","id":40823692,"diff_hunk":"@@ -385,8 +385,25 @@ Similar to the previous example, this job will retry if either a\n `NetworkError` (or subclass) exception is thrown **or** any of the callbacks\n return true.\n \n-Use `@retry_exceptions = []` to **only** use callbacks, to determine if the\n-job should retry.\n+You can also register a retry criteria check with a Symbol if the method is\n+already defined on the job class:\n+```\n+class AlwaysRetryJob\n+  extend Resque::Plugins::Retry\n+\n+  retry_criteria_check :yes\n+\n+  def self.yes(ex, *args)\n+    true\n+  end\n+end\n+\n+Use `@retry_exceptions = []` to **only** use your custom retry criteria checks\n+to determine if the job should retry.\n+\n+NB: Your callback must be able to accept the exception and job arguments as\n+passed parameters, or else it cannot be called. e.g., in the example above,\n+defining `def self.yes; true; end` would not work.","path":"README.md","position":24,"original_position":24,"commit_id":"20e95014295471d23ed7c79d86f5f16713183d06","original_commit_id":"2fb0ae1fc178944f30169b9afc275366f62c4bb3","user":{"login":"jzaleski","id":2303800,"avatar_url":"https://avatars.githubusercontent.com/u/2303800?v=3","gravatar_id":"","url":"https://api.github.com/users/jzaleski","html_url":"https://github.com/jzaleski","followers_url":"https://api.github.com/users/jzaleski/followers","following_url":"https://api.github.com/users/jzaleski/following{/other_user}","gists_url":"https://api.github.com/users/jzaleski/gists{/gist_id}","starred_url":"https://api.github.com/users/jzaleski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzaleski/subscriptions","organizations_url":"https://api.github.com/users/jzaleski/orgs","repos_url":"https://api.github.com/users/jzaleski/repos","events_url":"https://api.github.com/users/jzaleski/events{/privacy}","received_events_url":"https://api.github.com/users/jzaleski/received_events","type":"User","site_admin":false},"body":"Do we want this behavior? I'm thinking it might be better to just allow it to blow up than masking an underlying issue.","created_at":"2015-09-30T17:26:57Z","updated_at":"2015-09-30T17:26:57Z","html_url":"https://github.com/lantins/resque-retry/pull/126#discussion_r40823692","pull_request_url":"https://api.github.com/repos/lantins/resque-retry/pulls/126","_links":{"self":{"href":"https://api.github.com/repos/lantins/resque-retry/pulls/comments/40823692"},"html":{"href":"https://github.com/lantins/resque-retry/pull/126#discussion_r40823692"},"pull_request":{"href":"https://api.github.com/repos/lantins/resque-retry/pulls/126"}}},"pull_request":{"url":"https://api.github.com/repos/lantins/resque-retry/pulls/126","id":46408531,"html_url":"https://github.com/lantins/resque-retry/pull/126","diff_url":"https://github.com/lantins/resque-retry/pull/126.diff","patch_url":"https://github.com/lantins/resque-retry/pull/126.patch","issue_url":"https://api.github.com/repos/lantins/resque-retry/issues/126","number":126,"state":"open","locked":false,"title":"Allow retry criteria checks to be registered with Symbols","user":{"login":"thenovices","id":237647,"avatar_url":"https://avatars.githubusercontent.com/u/237647?v=3","gravatar_id":"","url":"https://api.github.com/users/thenovices","html_url":"https://github.com/thenovices","followers_url":"https://api.github.com/users/thenovices/followers","following_url":"https://api.github.com/users/thenovices/following{/other_user}","gists_url":"https://api.github.com/users/thenovices/gists{/gist_id}","starred_url":"https://api.github.com/users/thenovices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thenovices/subscriptions","organizations_url":"https://api.github.com/users/thenovices/orgs","repos_url":"https://api.github.com/users/thenovices/repos","events_url":"https://api.github.com/users/thenovices/events{/privacy}","received_events_url":"https://api.github.com/users/thenovices/received_events","type":"User","site_admin":false},"body":"As discussed here: https://github.com/lantins/resque-retry/pull/124#issuecomment-139380843","created_at":"2015-09-30T14:27:00Z","updated_at":"2015-09-30T17:26:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d1006320f56db948821f88301e1104b2e17a065c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lantins/resque-retry/pulls/126/commits","review_comments_url":"https://api.github.com/repos/lantins/resque-retry/pulls/126/comments","review_comment_url":"https://api.github.com/repos/lantins/resque-retry/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lantins/resque-retry/issues/126/comments","statuses_url":"https://api.github.com/repos/lantins/resque-retry/statuses/20e95014295471d23ed7c79d86f5f16713183d06","head":{"label":"thenovices:retry-criteria-checks","ref":"retry-criteria-checks","sha":"20e95014295471d23ed7c79d86f5f16713183d06","user":{"login":"thenovices","id":237647,"avatar_url":"https://avatars.githubusercontent.com/u/237647?v=3","gravatar_id":"","url":"https://api.github.com/users/thenovices","html_url":"https://github.com/thenovices","followers_url":"https://api.github.com/users/thenovices/followers","following_url":"https://api.github.com/users/thenovices/following{/other_user}","gists_url":"https://api.github.com/users/thenovices/gists{/gist_id}","starred_url":"https://api.github.com/users/thenovices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thenovices/subscriptions","organizations_url":"https://api.github.com/users/thenovices/orgs","repos_url":"https://api.github.com/users/thenovices/repos","events_url":"https://api.github.com/users/thenovices/events{/privacy}","received_events_url":"https://api.github.com/users/thenovices/received_events","type":"User","site_admin":false},"repo":{"id":41419313,"name":"resque-retry","full_name":"thenovices/resque-retry","owner":{"login":"thenovices","id":237647,"avatar_url":"https://avatars.githubusercontent.com/u/237647?v=3","gravatar_id":"","url":"https://api.github.com/users/thenovices","html_url":"https://github.com/thenovices","followers_url":"https://api.github.com/users/thenovices/followers","following_url":"https://api.github.com/users/thenovices/following{/other_user}","gists_url":"https://api.github.com/users/thenovices/gists{/gist_id}","starred_url":"https://api.github.com/users/thenovices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thenovices/subscriptions","organizations_url":"https://api.github.com/users/thenovices/orgs","repos_url":"https://api.github.com/users/thenovices/repos","events_url":"https://api.github.com/users/thenovices/events{/privacy}","received_events_url":"https://api.github.com/users/thenovices/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thenovices/resque-retry","description":"A resque plugin; provides retry, delay and exponential backoff support for resque jobs.","fork":true,"url":"https://api.github.com/repos/thenovices/resque-retry","forks_url":"https://api.github.com/repos/thenovices/resque-retry/forks","keys_url":"https://api.github.com/repos/thenovices/resque-retry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thenovices/resque-retry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thenovices/resque-retry/teams","hooks_url":"https://api.github.com/repos/thenovices/resque-retry/hooks","issue_events_url":"https://api.github.com/repos/thenovices/resque-retry/issues/events{/number}","events_url":"https://api.github.com/repos/thenovices/resque-retry/events","assignees_url":"https://api.github.com/repos/thenovices/resque-retry/assignees{/user}","branches_url":"https://api.github.com/repos/thenovices/resque-retry/branches{/branch}","tags_url":"https://api.github.com/repos/thenovices/resque-retry/tags","blobs_url":"https://api.github.com/repos/thenovices/resque-retry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thenovices/resque-retry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thenovices/resque-retry/git/refs{/sha}","trees_url":"https://api.github.com/repos/thenovices/resque-retry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thenovices/resque-retry/statuses/{sha}","languages_url":"https://api.github.com/repos/thenovices/resque-retry/languages","stargazers_url":"https://api.github.com/repos/thenovices/resque-retry/stargazers","contributors_url":"https://api.github.com/repos/thenovices/resque-retry/contributors","subscribers_url":"https://api.github.com/repos/thenovices/resque-retry/subscribers","subscription_url":"https://api.github.com/repos/thenovices/resque-retry/subscription","commits_url":"https://api.github.com/repos/thenovices/resque-retry/commits{/sha}","git_commits_url":"https://api.github.com/repos/thenovices/resque-retry/git/commits{/sha}","comments_url":"https://api.github.com/repos/thenovices/resque-retry/comments{/number}","issue_comment_url":"https://api.github.com/repos/thenovices/resque-retry/issues/comments{/number}","contents_url":"https://api.github.com/repos/thenovices/resque-retry/contents/{+path}","compare_url":"https://api.github.com/repos/thenovices/resque-retry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thenovices/resque-retry/merges","archive_url":"https://api.github.com/repos/thenovices/resque-retry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thenovices/resque-retry/downloads","issues_url":"https://api.github.com/repos/thenovices/resque-retry/issues{/number}","pulls_url":"https://api.github.com/repos/thenovices/resque-retry/pulls{/number}","milestones_url":"https://api.github.com/repos/thenovices/resque-retry/milestones{/number}","notifications_url":"https://api.github.com/repos/thenovices/resque-retry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thenovices/resque-retry/labels{/name}","releases_url":"https://api.github.com/repos/thenovices/resque-retry/releases{/id}","created_at":"2015-08-26T10:20:15Z","updated_at":"2015-08-26T10:20:15Z","pushed_at":"2015-09-30T16:10:50Z","git_url":"git://github.com/thenovices/resque-retry.git","ssh_url":"git@github.com:thenovices/resque-retry.git","clone_url":"https://github.com/thenovices/resque-retry.git","svn_url":"https://github.com/thenovices/resque-retry","homepage":"","size":451,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"lantins:master","ref":"master","sha":"e09cd1bca4a85b6cfe6ee41a95e3827628cefc7b","user":{"login":"lantins","id":22917,"avatar_url":"https://avatars.githubusercontent.com/u/22917?v=3","gravatar_id":"","url":"https://api.github.com/users/lantins","html_url":"https://github.com/lantins","followers_url":"https://api.github.com/users/lantins/followers","following_url":"https://api.github.com/users/lantins/following{/other_user}","gists_url":"https://api.github.com/users/lantins/gists{/gist_id}","starred_url":"https://api.github.com/users/lantins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lantins/subscriptions","organizations_url":"https://api.github.com/users/lantins/orgs","repos_url":"https://api.github.com/users/lantins/repos","events_url":"https://api.github.com/users/lantins/events{/privacy}","received_events_url":"https://api.github.com/users/lantins/received_events","type":"User","site_admin":false},"repo":{"id":624857,"name":"resque-retry","full_name":"lantins/resque-retry","owner":{"login":"lantins","id":22917,"avatar_url":"https://avatars.githubusercontent.com/u/22917?v=3","gravatar_id":"","url":"https://api.github.com/users/lantins","html_url":"https://github.com/lantins","followers_url":"https://api.github.com/users/lantins/followers","following_url":"https://api.github.com/users/lantins/following{/other_user}","gists_url":"https://api.github.com/users/lantins/gists{/gist_id}","starred_url":"https://api.github.com/users/lantins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lantins/subscriptions","organizations_url":"https://api.github.com/users/lantins/orgs","repos_url":"https://api.github.com/users/lantins/repos","events_url":"https://api.github.com/users/lantins/events{/privacy}","received_events_url":"https://api.github.com/users/lantins/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lantins/resque-retry","description":"A resque plugin; provides retry, delay and exponential backoff support for resque jobs.","fork":false,"url":"https://api.github.com/repos/lantins/resque-retry","forks_url":"https://api.github.com/repos/lantins/resque-retry/forks","keys_url":"https://api.github.com/repos/lantins/resque-retry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lantins/resque-retry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lantins/resque-retry/teams","hooks_url":"https://api.github.com/repos/lantins/resque-retry/hooks","issue_events_url":"https://api.github.com/repos/lantins/resque-retry/issues/events{/number}","events_url":"https://api.github.com/repos/lantins/resque-retry/events","assignees_url":"https://api.github.com/repos/lantins/resque-retry/assignees{/user}","branches_url":"https://api.github.com/repos/lantins/resque-retry/branches{/branch}","tags_url":"https://api.github.com/repos/lantins/resque-retry/tags","blobs_url":"https://api.github.com/repos/lantins/resque-retry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lantins/resque-retry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lantins/resque-retry/git/refs{/sha}","trees_url":"https://api.github.com/repos/lantins/resque-retry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lantins/resque-retry/statuses/{sha}","languages_url":"https://api.github.com/repos/lantins/resque-retry/languages","stargazers_url":"https://api.github.com/repos/lantins/resque-retry/stargazers","contributors_url":"https://api.github.com/repos/lantins/resque-retry/contributors","subscribers_url":"https://api.github.com/repos/lantins/resque-retry/subscribers","subscription_url":"https://api.github.com/repos/lantins/resque-retry/subscription","commits_url":"https://api.github.com/repos/lantins/resque-retry/commits{/sha}","git_commits_url":"https://api.github.com/repos/lantins/resque-retry/git/commits{/sha}","comments_url":"https://api.github.com/repos/lantins/resque-retry/comments{/number}","issue_comment_url":"https://api.github.com/repos/lantins/resque-retry/issues/comments{/number}","contents_url":"https://api.github.com/repos/lantins/resque-retry/contents/{+path}","compare_url":"https://api.github.com/repos/lantins/resque-retry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lantins/resque-retry/merges","archive_url":"https://api.github.com/repos/lantins/resque-retry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lantins/resque-retry/downloads","issues_url":"https://api.github.com/repos/lantins/resque-retry/issues{/number}","pulls_url":"https://api.github.com/repos/lantins/resque-retry/pulls{/number}","milestones_url":"https://api.github.com/repos/lantins/resque-retry/milestones{/number}","notifications_url":"https://api.github.com/repos/lantins/resque-retry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lantins/resque-retry/labels{/name}","releases_url":"https://api.github.com/repos/lantins/resque-retry/releases{/id}","created_at":"2010-04-23T05:36:39Z","updated_at":"2015-09-28T17:33:47Z","pushed_at":"2015-09-30T16:10:51Z","git_url":"git://github.com/lantins/resque-retry.git","ssh_url":"git@github.com:lantins/resque-retry.git","clone_url":"https://github.com/lantins/resque-retry.git","svn_url":"https://github.com/lantins/resque-retry","homepage":"","size":916,"stargazers_count":351,"watchers_count":351,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":92,"mirror_url":null,"open_issues_count":4,"forks":92,"open_issues":4,"watchers":351,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lantins/resque-retry/pulls/126"},"html":{"href":"https://github.com/lantins/resque-retry/pull/126"},"issue":{"href":"https://api.github.com/repos/lantins/resque-retry/issues/126"},"comments":{"href":"https://api.github.com/repos/lantins/resque-retry/issues/126/comments"},"review_comments":{"href":"https://api.github.com/repos/lantins/resque-retry/pulls/126/comments"},"review_comment":{"href":"https://api.github.com/repos/lantins/resque-retry/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lantins/resque-retry/pulls/126/commits"},"statuses":{"href":"https://api.github.com/repos/lantins/resque-retry/statuses/20e95014295471d23ed7c79d86f5f16713183d06"}}}}