IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 26, 2007, 10:10:40 AM (19 years ago)
Author:
eugene
Message:

fixed npending, active

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/pantasks/CheckTasks.c

    r11055 r11317  
    1616
    1717    /* need to check if the current time is within valid/invalid periods */
    18     if (!CheckTimeRanges (task[0].ranges, task[0].Nranges)) continue;
    19     if (task[0].Nmax && (task[0].Njobs >= task[0].Nmax)) continue;
    20     if (task[0].NpendingMax && (task[0].Npending >= task[0].NpendingMax)) continue;
     18    if (!CheckTimeRanges (task[0].ranges, task[0].Nranges)) {
     19        gettimeofday (&task[0].last, (void *) NULL);
     20        continue;
     21    }
     22    if (task[0].Nmax && (task[0].Njobs >= task[0].Nmax)) {
     23        gettimeofday (&task[0].last, (void *) NULL);
     24        continue;
     25    }
     26    if (task[0].NpendingMax && (task[0].Npending >= task[0].NpendingMax)) {
     27        gettimeofday (&task[0].last, (void *) NULL);
     28        continue;
     29    }
     30
     31    /* check if there are errors with this task */
     32    if (!ValidateTask (task, TRUE)) {
     33        gettimeofday (&task[0].last, (void *) NULL);
     34        continue;
     35    }
    2136
    2237    /* ready to run? : run task.exec macro */
    2338    if (task[0].exec != NULL) {
    2439      status = exec_loop (task[0].exec);
    25       if (!status) continue;
     40      if (!status) {
     41          gettimeofday (&task[0].last, (void *) NULL);
     42          continue;
     43      }
    2644    }
    27     if (!ValidateTask (task, TRUE)) continue;
    2845
    2946    /* construct job from task */
Note: See TracChangeset for help on using the changeset viewer.