lib/sidekiq_unique_jobs/lock.rb
Class Lock
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Lock # rubocop:disable Metrics/ClassLength
# includes "SidekiqUniqueJobs::Connection"
# @!parse include SidekiqUniqueJobs::Connection
include SidekiqUniqueJobs::Connection
- Create a ticketCreate a ticket
Complex method SidekiqUniqueJobs::Lock#lock (29.9) Open
Open
def lock(job_id, lock_info = {}, score = nil)
score ||= now_f
redis do |conn|
conn.multi do |pipeline|
pipeline.set(key.digest, job_id)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.
You can read more about ABC metrics or the flog tool
Complex method SidekiqUniqueJobs::Lock#del (24.0) Open
Open
def del
redis do |conn|
conn.multi do |pipeline|
pipeline.zrem(DIGESTS, key.digest)
pipeline.del(key.digest, key.queued, key.primed, key.locked, key.info)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.
You can read more about ABC metrics or the flog tool
Expected an indentation at 20 instead of at 19. Open
Open
info: #{info.value}
- Create a ticketCreate a ticket
- Exclude checks
Expected an indentation at 14 instead of at 13. Open
Open
changelogs: #{changelogs}
- Create a ticketCreate a ticket
- Exclude checks