IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 5, 2010, 3:34:21 PM (16 years ago)
Author:
bills
Message:

improvements to control job stoppage based on fault count

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/pstamptool.c

    r29289 r29328  
    883883    PXOPT_LOOKUP_S64(req_id,    config->args, "-req_id", false, false);
    884884    PXOPT_LOOKUP_S64(dep_id,    config->args, "-dep_id", false, false);
    885 
    886     if (!job_id && !req_id && !dep_id) {
    887         psError(PS_ERR_UNKNOWN, true, "at least one of -job_id -req_id or -dep_id is required");
     885    PXOPT_LOOKUP_S32(fault_count, config->args, "-fault_count",  false, false);
     886
     887    if (!job_id && !req_id && !dep_id && !fault_count) {
     888        psError(PS_ERR_UNKNOWN, true, "at least one of -job_id -req_id -dep_id or -fault_count is required");
    888889        return false;
    889890    }
     
    904905    PXOPT_COPY_S32(config->args, where, "-fault",  "pstampJob.fault", "==");
    905906    PXOPT_COPY_STR(config->args, where, "-state",  "pstampJob.state", "==");
     907    PXOPT_COPY_S32(config->args, where, "-fault_count", "pstampJob.fault_count", ">=");
     908    pxAddLabelSearchArgs(config, where, "-label", "pstampRequest.label", "LIKE");
    906909
    907910    psString query = pxDataGet("pstamptool_updatejob.sql");
     
    948951    PXOPT_COPY_S64(config->args, where, "-dep_id", "dep_id", "==");
    949952    PXOPT_COPY_S32(config->args, where, "-fault",  "pstampDependent.fault", "==");
     953    pxAddLabelSearchArgs(config, where, "-label", "pstampRequest.label", "LIKE");
     954    // if (fault_count) {
     955        PXOPT_COPY_S32(config->args, where, "-fault_count", "pstampDependent.fault_count", ">=");
     956    // }
    950957
    951958    // XXX: How about selecting by pstampRequest.label? No. That is too dangerous by itself.
Note: See TracChangeset for help on using the changeset viewer.