For job with retry - the attempt count doesn't match with log file when inserting into database. Issue #331
minor update from codereview feedback
Merge pull request #332 from hluu/master

For job with retry - the attempt count doesn't match with log file when inserting into database - issue #331