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