Beispiel #1
0
int retry_job_exit(

  job_exiting_retry_info *jeri)

  {
  char  log_buf[LOCAL_LOG_BUF_SIZE];
  job  *pjob;

  jeri->attempts++;

  if (jeri->attempts >= MAX_EXITING_RETRY_ATTEMPTS)
    {
    /* job has been attempted the maximum number of times. Destroy the job */
    if ((pjob = svr_find_job(jeri->jobid, TRUE)) != NULL)
      {
      force_purge_work(pjob);
      }

    remove_entry_from_exiting_list(jeri);
    }
  else
    {
    snprintf(log_buf, sizeof(log_buf), "Retrying job exiting for job %s",
      jeri->jobid);
    log_event(PBSEVENT_JOB, PBS_EVENTCLASS_JOB, __func__, log_buf);
    
    jeri->last_attempt = time(NULL);
    on_job_exit(NULL, strdup(jeri->jobid));
    }

  return(PBSE_NONE);
  } /* END retry_job_exit() */
Beispiel #2
0
int retry_job_exit(

  char *jobid)

  {
  char  log_buf[LOCAL_LOG_BUF_SIZE];

  snprintf(log_buf, sizeof(log_buf), "Retrying job exiting for job %s",
    jobid);
  log_event(PBSEVENT_JOB, PBS_EVENTCLASS_JOB, __func__, log_buf);
  
  /* jobid will be freed in on_job_exit() */
  on_job_exit(NULL, jobid);

  return(PBSE_NONE);
  } /* END retry_job_exit() */