Updated

app/jobs / backfill_signature_uuids_job.rb

B
20 lines of codes
1 methods
17.5 complexity/method
2 churn
17.53 complexity
43 duplications
class BackfillSignatureUuidsJob < ApplicationJob
  1. BackfillSignatureUuidsJob has no descriptive comment
queue_as :low_priority def perform(id = 0)
  1. Similar code found in 2 nodes Locations: 0 1
  2. BackfillSignatureUuidsJob#perform has approx 6 statements
signatures = Signature.where(uuid: nil).batch(id).to_a max_id = signatures.map(&:id).max signatures.each do |signature| next if signature.uuid?
  1. BackfillSignatureUuidsJob#perform refers to 'signature' more than self (maybe move it to another class?) Locations: 0 1 2
if signature.email?
  1. BackfillSignatureUuidsJob#perform refers to 'signature' more than self (maybe move it to another class?) Locations: 0 1 2
signature.update_uuid
  1. BackfillSignatureUuidsJob#perform refers to 'signature' more than self (maybe move it to another class?) Locations: 0 1 2
end end if Signature.exists?(uuid: nil) self.class.perform_later(max_id) end end end