Skip to content

Proposal: add rubocop to avoid use of find in Sidekiq workers

Proposal

Documentation says to avoid use of find in Sidekiq workers because of the retry mechanism. If a record gets deleted before the worker runs, the job should not fail. This takes up resources unnecessarily.

We should introduce a cop that runs on workers only to alert developers when using find and offer the alternative of find_by

Edited by Terri Chu