add the concept of failed jobs
add test for retrying failed job
fix deleteFailedJobs method