app/controllers/api/v1/jobs_controller.rb
Showing 2 of 2 total issues
Method shift
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
Open
def shift $redis.with do |r| job_shift_sem = Redis::Semaphore.new(:job_shift_lock, redis: r) job_shift_sem.lock do shifted_build_lists = r.smembers('abf_worker:shifted_build_lists')
- Read upRead up
Method shift
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def shift $redis.with do |r| job_shift_sem = Redis::Semaphore.new(:job_shift_lock, redis: r) job_shift_sem.lock do shifted_build_lists = r.smembers('abf_worker:shifted_build_lists')