{"action":"created","issue":{"url":"https://api.github.com/repos/CruGlobal/mpdx/issues/325","labels_url":"https://api.github.com/repos/CruGlobal/mpdx/issues/325/labels{/name}","comments_url":"https://api.github.com/repos/CruGlobal/mpdx/issues/325/comments","events_url":"https://api.github.com/repos/CruGlobal/mpdx/issues/325/events","html_url":"https://github.com/CruGlobal/mpdx/pull/325","id":63747855,"number":325,"title":"Add check for retried or running dup Sidekiq job","user":{"login":"draffensperger","id":2855507,"avatar_url":"https://avatars.githubusercontent.com/u/2855507?v=3","gravatar_id":"","url":"https://api.github.com/users/draffensperger","html_url":"https://github.com/draffensperger","followers_url":"https://api.github.com/users/draffensperger/followers","following_url":"https://api.github.com/users/draffensperger/following{/other_user}","gists_url":"https://api.github.com/users/draffensperger/gists{/gist_id}","starred_url":"https://api.github.com/users/draffensperger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/draffensperger/subscriptions","organizations_url":"https://api.github.com/users/draffensperger/orgs","repos_url":"https://api.github.com/users/draffensperger/repos","events_url":"https://api.github.com/users/draffensperger/events{/privacy}","received_events_url":"https://api.github.com/users/draffensperger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-03-23T15:15:29Z","updated_at":"2015-03-25T04:18:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CruGlobal/mpdx/pulls/325","html_url":"https://github.com/CruGlobal/mpdx/pull/325","diff_url":"https://github.com/CruGlobal/mpdx/pull/325.diff","patch_url":"https://github.com/CruGlobal/mpdx/pull/325.patch"},"body":"The `sidekiq-unique-jobs` gem does not preserve uniqueness if a job is in the retry queue or if a Sidekiq process crashes and the Sidekiq pro job recovery feature gets used. This code is a quick fix to break out of jobs that are in the retry queue or have a duplicate, older job running already. I've tested it locally with some simple test workers and it does indeed exit out of duplicate jobs right away. My suggestion would be to merge this to stage first and then if there are no issues there and the background jobs work correctly to merge it into master.\r\n\r\nI think this code should ultimately belong in the gem itself and there an [issue open](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/14) about this problem. My thought is to reply to the issue and lend our weight behind getting the gem changed. If it's not a hard fix I may be open to trying to collaborate with the gem authors to get it in."},"comment":{"url":"https://api.github.com/repos/CruGlobal/mpdx/issues/comments/85827480","html_url":"https://github.com/CruGlobal/mpdx/pull/325#issuecomment-85827480","issue_url":"https://api.github.com/repos/CruGlobal/mpdx/issues/325","id":85827480,"user":{"login":"twinge","id":23668,"avatar_url":"https://avatars.githubusercontent.com/u/23668?v=3","gravatar_id":"","url":"https://api.github.com/users/twinge","html_url":"https://github.com/twinge","followers_url":"https://api.github.com/users/twinge/followers","following_url":"https://api.github.com/users/twinge/following{/other_user}","gists_url":"https://api.github.com/users/twinge/gists{/gist_id}","starred_url":"https://api.github.com/users/twinge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twinge/subscriptions","organizations_url":"https://api.github.com/users/twinge/orgs","repos_url":"https://api.github.com/users/twinge/repos","events_url":"https://api.github.com/users/twinge/events{/privacy}","received_events_url":"https://api.github.com/users/twinge/received_events","type":"User","site_admin":false},"created_at":"2015-03-25T04:18:03Z","updated_at":"2015-03-25T04:18:03Z","body":":+1:  Thanks for testing that locally"}}