code: private void jobCompleted(JobInProgress job, JobSchedulingInfo oldInfo, 
                              QueueInfo qi) {
      LOG.info("Job " + job.getJobID().toString() + " submitted to queue " 
          + job.getProfile().getQueueName() + " has completed");
      //remove jobs from both queue's a job can be in
      //running and waiting queue at the same time.
      qi.removeRunningJob(oldInfo);
      qi.removeWaitingJob(oldInfo);
      // let scheduler know
      scheduler.jobCompleted(job);
    }
docs: /*
  Method removes the jobs from both running and waiting job queue in
  job queue manager.