Refactor signal logic for job arrays