added attempts method to jobs.
Merge remote-tracking branch 'origin/master'