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

Cop idea: Use sidekiq built-in retry mechanism #6

Open
ydakuka opened this issue Sep 14, 2023 · 0 comments
Open

Cop idea: Use sidekiq built-in retry mechanism #6

ydakuka opened this issue Sep 14, 2023 · 0 comments

Comments

@ydakuka
Copy link

ydakuka commented Sep 14, 2023

Describe the solution you'd like

https://github.com/sidekiq/sidekiq/wiki/Active-Job#customizing-error-handling

https://github.com/toptal/active-job-style-guide#retries

# bad
class ExampleJob < ActiveJob::Base
  retry_on ErrorLoadingSite, wait: 5.minutes, queue: :low_priority

  def perform(*args)
    # Perform Job
  end
end

# good
class ExampleJob < ActiveJob::Base
  sidekiq_options retry: 5

  def perform(*args)
    # Perform Job
  end
end
@ydakuka ydakuka changed the title Cop idea: Use built-in retry mechanism Cop idea: Use sidekiq built-in retry mechanism Sep 16, 2023
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

1 participant