Skip to content

Using with sidekiq delayed extensions #45

@skalb

Description

@skalb

I'm currently using unique to guarantee I don't send multiple emails after jobs complete.

I end up having to wrap the email call in a worker like:

class UniqueMailer
  include Sidekiq::Worker

  sidekiq_options unique: true, unique_job_expiration: 30 * 60, unique_unlock_order: :never

  def perform(resource_id)
   Mailer.delay.mail(resource_id)
  end

It would be nice if something like the following worked:

Mailer.delay.mail(resource_id, unique: true, unique_job_expiration: 30 * 60, unique_unlock_order: :never)

or a new method

Mailer.delay.unique_mail(resource_id, unique: true, unique_job_expiration: 30 * 60, unique_unlock_order: :never)

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions