code: public void markTask(StatusTrail st, boolean success) {        
          st.setStatus(success ? JobStatus.done : JobStatus.not_done);
          st.setAttemptsDone(st.getAttemptsDone() + 1);
          st.setGivenUp(st.getAttemptsDone() >= getMaxTaskAttempts() ? 1 : 0);
          updateStatusTrail(st);
      }
docs: Change the status of a task.
  @param st
  @param success