IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 14, 2010, 1:26:40 PM (16 years ago)
Author:
bills
Message:

allow selecting jobs to update by req_id and state. This is useful for commands like
pst -updatejob -set_state stop -set_fault 25 -state run -req_id 6532

File:
1 edited

Legend:

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

    r28297 r28308  
    870870
    871871    PXOPT_LOOKUP_S64(job_id,    config->args, "-job_id", false, false);
     872    PXOPT_LOOKUP_S64(req_id,    config->args, "-req_id", false, false);
    872873    PXOPT_LOOKUP_S64(dep_id,    config->args, "-dep_id", false, false);
    873874
    874     if (!job_id && !dep_id) {
    875         psError(PS_ERR_UNKNOWN, true, "at least -job_id or -dep_id is required");
     875    if (!job_id && !req_id && !dep_id) {
     876        psError(PS_ERR_UNKNOWN, true, "at least one of -job_id -req_id or -dep_id is required");
    876877        return false;
    877878    }
     
    888889
    889890    PXOPT_COPY_S64(config->args, where, "-job_id", "job_id", "==");
     891    PXOPT_COPY_S64(config->args, where, "-req_id", "req_id", "==");
    890892    PXOPT_COPY_S64(config->args, where, "-dep_id", "dep_id", "==");
     893    PXOPT_COPY_STR(config->args, where, "-state",  "pstampJob.state", "==");
    891894
    892895    psString query = pxDataGet("pstamptool_updatejob.sql");
Note: See TracChangeset for help on using the changeset viewer.