Merge "Add attempts logic for jobs"