IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 22, 2010, 3:18:51 PM (16 years ago)
Author:
heather
Message:

minidvodbcopy now works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/haf_branches/ipp.rsync.20101015/ippTools/src/minidvodbtool.c

    r29441 r29526  
    255255  PXOPT_COPY_STR(config->args, where, "-minidvodbcopy_id", "minidvodbCopy.minidvodbcopy_id", "==");
    256256  PXOPT_COPY_STR(config->args, where, "-destination_host", "minidvodbCopy.destination_host", "==");
     257  PXOPT_COPY_STR(config->args, where, "-minidvodb_group", "minidvodbRun.minidvodb_group", "==");
    257258  PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
    258259  PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
     260  PXOPT_LOOKUP_BOOL(pending, config->args, "-pending", false);
    259261  PXOPT_LOOKUP_BOOL(faulted, config->args, "-faulted", false);
    260262  if (!psListLength(where->list)) {
     
    294296    }
    295297    psFree(where);
     298
     299    if (pending) {
     300       //add the cuts for pending (state new, no faults)
     301      psStringAppend(&query, " %s", " AND minidvodbCopy.state = 'new' AND minidvodbCopy.fault = 0 AND minidvodbCopy.destination_host IS NOT NULL AND minidvodbCopy.minidvodb_rsync_path IS NOT NULL");
     302    }
     303
    296304
    297305    // order by epoch
     
    343351  PXOPT_COPY_S64(config->args, where, "-minidvodb_id", "minidvodbCopy.minidvodb_id", "==");
    344352  PXOPT_COPY_STR(config->args, where, "-destination_host", "destination_host", "==");
     353  PXOPT_COPY_S16(config->args, where, "-fault", "minidvodbCopy.fault", "==");
    345354
    346355  if (!psListLength(where->list) && !psMetadataLookupBool(NULL, config->args, "-all")) {
     
    472481  }
    473482
    474  
    475 
    476   psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
     483    psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
    477484  psStringAppend(&query, " WHERE %s", whereClause);
    478485
     486 
    479487  if (!p_psDBRunQuery(config->dbh, query)) {
    480488    psError(PS_ERR_UNKNOWN, false, "database error %s", query);
Note: See TracChangeset for help on using the changeset viewer.