Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is possible to use my own Sidekiq Worker? #54

Open
lemboy opened this issue Oct 12, 2015 · 1 comment
Open

It is possible to use my own Sidekiq Worker? #54

lemboy opened this issue Oct 12, 2015 · 1 comment

Comments

@lemboy
Copy link

lemboy commented Oct 12, 2015

For example, we need to define sidekiq_options and sidekiq_retry_in options.

Now we did it in this way (sort of 'decorator' for sidekiq.rb), but it's probably not the best solution.

# config/initializers/vero_sidekiq_worker.rb

module Vero
  class SidekiqWorker
    include ::Sidekiq::Worker

    sidekiq_options retry: 2
    sidekiq_retry_in { |count| 60 }

    sidekiq_retries_exhausted do |msg|
      Rails.logger.error "Failed #{msg['class']} with #{msg['args']}: #{msg['error_message']}"
    end

  end
end
@shaneog
Copy link
Contributor

shaneog commented Oct 14, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants