{"action":"created","issue":{"url":"https://api.github.com/repos/mperham/sidekiq/issues/2844","repository_url":"https://api.github.com/repos/mperham/sidekiq","labels_url":"https://api.github.com/repos/mperham/sidekiq/issues/2844/labels{/name}","comments_url":"https://api.github.com/repos/mperham/sidekiq/issues/2844/comments","events_url":"https://api.github.com/repos/mperham/sidekiq/issues/2844/events","html_url":"https://github.com/mperham/sidekiq/issues/2844","id":135733599,"number":2844,"title":"Are unique jobs really unique during the time interval ?","user":{"login":"Micka33","id":3918958,"avatar_url":"https://avatars.githubusercontent.com/u/3918958?v=3","gravatar_id":"","url":"https://api.github.com/users/Micka33","html_url":"https://github.com/Micka33","followers_url":"https://api.github.com/users/Micka33/followers","following_url":"https://api.github.com/users/Micka33/following{/other_user}","gists_url":"https://api.github.com/users/Micka33/gists{/gist_id}","starred_url":"https://api.github.com/users/Micka33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Micka33/subscriptions","organizations_url":"https://api.github.com/users/Micka33/orgs","repos_url":"https://api.github.com/users/Micka33/repos","events_url":"https://api.github.com/users/Micka33/events{/privacy}","received_events_url":"https://api.github.com/users/Micka33/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-23T13:14:20Z","updated_at":"2016-02-24T17:53:59Z","closed_at":"2016-02-24T07:44:42Z","body":"I just got my Sidekiq licence and I want to rely on unique jobs.\r\n\r\nThe [documentation](https://github.com/mperham/sidekiq/wiki/Ent-Unique-Jobs#use) states :\r\n> If your job retries for a while, 10 minutes can pass, thus allowing another copy of the same job to be pushed to Redis.\r\n\r\nThen If I set a unique job this way:\r\n```\r\nsidekiq_options unique_for: 5.months\r\n```\r\nIs it 100% guarantied this job will be unique for 5 months or before success ?"},"comment":{"url":"https://api.github.com/repos/mperham/sidekiq/issues/comments/188381038","html_url":"https://github.com/mperham/sidekiq/issues/2844#issuecomment-188381038","issue_url":"https://api.github.com/repos/mperham/sidekiq/issues/2844","id":188381038,"user":{"login":"ryansch","id":146013,"avatar_url":"https://avatars.githubusercontent.com/u/146013?v=3","gravatar_id":"","url":"https://api.github.com/users/ryansch","html_url":"https://github.com/ryansch","followers_url":"https://api.github.com/users/ryansch/followers","following_url":"https://api.github.com/users/ryansch/following{/other_user}","gists_url":"https://api.github.com/users/ryansch/gists{/gist_id}","starred_url":"https://api.github.com/users/ryansch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryansch/subscriptions","organizations_url":"https://api.github.com/users/ryansch/orgs","repos_url":"https://api.github.com/users/ryansch/repos","events_url":"https://api.github.com/users/ryansch/events{/privacy}","received_events_url":"https://api.github.com/users/ryansch/received_events","type":"User","site_admin":false},"created_at":"2016-02-24T17:53:59Z","updated_at":"2016-02-24T17:53:59Z","body":"For one of our algorithms that needs that 100% guarantee we use a dual lock system.  We use sidekiq unique jobs as our first cheap lock that is fast and keeps most of the duplicate jobs from being scheduled.  We then use redlock as our second expensive lock that guarantees mutual exclusion (as long as you hit your time budget).  You could substitute any kind of distributed lock for redlock there."}}