{"action":"closed","issue":{"url":"https://api.github.com/repos/mhenrixon/sidekiq-unique-jobs/issues/45","labels_url":"https://api.github.com/repos/mhenrixon/sidekiq-unique-jobs/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/mhenrixon/sidekiq-unique-jobs/issues/45/comments","events_url":"https://api.github.com/repos/mhenrixon/sidekiq-unique-jobs/issues/45/events","html_url":"https://github.com/mhenrixon/sidekiq-unique-jobs/issues/45","id":41539740,"number":45,"title":"Using with sidekiq delayed extensions","user":{"login":"skalb","id":262745,"avatar_url":"https://avatars.githubusercontent.com/u/262745?v=3","gravatar_id":"","url":"https://api.github.com/users/skalb","html_url":"https://github.com/skalb","followers_url":"https://api.github.com/users/skalb/followers","following_url":"https://api.github.com/users/skalb/following{/other_user}","gists_url":"https://api.github.com/users/skalb/gists{/gist_id}","starred_url":"https://api.github.com/users/skalb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skalb/subscriptions","organizations_url":"https://api.github.com/users/skalb/orgs","repos_url":"https://api.github.com/users/skalb/repos","events_url":"https://api.github.com/users/skalb/events{/privacy}","received_events_url":"https://api.github.com/users/skalb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-08-29T21:09:00Z","updated_at":"2015-10-05T19:18:59Z","closed_at":"2015-10-05T19:18:59Z","body":"I'm currently using unique to guarantee I don't send multiple emails after jobs complete.\r\n\r\nI end up having to wrap the email call in a worker like:\r\n\r\n```\r\nclass UniqueMailer\r\n  include Sidekiq::Worker\r\n\r\n  sidekiq_options unique: true, unique_job_expiration: 30 * 60, unique_unlock_order: :never\r\n\r\n  def perform(resource_id)\r\n   Mailer.delay.mail(resource_id)\r\n  end\r\n```\r\n\r\nIt would be nice if something like the following worked:\r\n\r\n```\r\nMailer.delay.mail(resource_id, unique: true, unique_job_expiration: 30 * 60, unique_unlock_order: :never)\r\n```\r\n\r\nor a new method\r\n\r\n```\r\nMailer.delay.unique_mail(resource_id, unique: true, unique_job_expiration: 30 * 60, unique_unlock_order: :never)\r\n```\r\n\r\nThoughts?"}}