candidates = candidates.where(
'state = ? or (owner_uuid = ? and state in (?))',
Job::Complete, current_user.uuid, [Job::Queued, Job::Running])
candidates = candidates.where(
'state = ? or (owner_uuid = ? and state in (?))',
Job::Complete, current_user.uuid, [Job::Queued, Job::Running])