IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29526


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

minidvodbcopy now works

Location:
branches/haf_branches/ipp.rsync.20101015
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/haf_branches/ipp.rsync.20101015/ippScripts/Build.PL

    r28486 r29526  
    6464        scripts/minidvodb_createdb.pl
    6565        scripts/minidvodb_merge.pl
     66        scripts/minidvodb_copy.pl
    6667        scripts/ippdb.pl
    6768        scripts/ipp_cleanup.pl
  • branches/haf_branches/ipp.rsync.20101015/ippTasks/Makefile.am

    r29250 r29526  
    3434        science.cleanup.pro \
    3535        minidvodb.pro \
     36        minidvodbcopy.pro \
    3637        nightly_stacks.pro \
    3738        burntool.pro \
  • 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);
  • branches/haf_branches/ipp.rsync.20101015/ippTools/src/minidvodbtoolConfig.c

    r29441 r29526  
    4949    // -definebyquery
    5050    psMetadata *definebyqueryArgs = psMetadataAlloc();
    51     psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-minidvodb_id",             0, "search by cam_id", 0);
     51    psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-minidvodb_id",             0, "search by minidvodb_id", 0);
    5252    pxcamSetSearchArgs(definebyqueryArgs);
    53        psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-minidvodb_group", PS_META_DUPLICATE_OK, "search by camRun data_group", NULL);
     53       psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-minidvodb_group", PS_META_DUPLICATE_OK, "search by minidvodbRun minidvodb_group", NULL);
    5454
    5555       
    5656    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_minidvodb_rsync_path",        0, "define workdir", NULL);
    5757    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_destination_host",          0, "define label", NULL);
    58     psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_reduction",      0, "define reduction class", NULL);
     58    //    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_reduction",      0, "define reduction class", NULL);
    5959   psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-pretend",           0, "do not actually modify the database", false);
    6060    psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-simple",            0, "use the simple output format", false);
     
    6262    psMetadata *listminidvodbcopyArgs = psMetadataAlloc();
    6363    psMetadataAddU64(listminidvodbcopyArgs, PS_LIST_TAIL, "-minidvodb_id",        0, "search by minidvodb_id", 0);
    64     psMetadataAddStr(listminidvodbcopyArgs, PS_LIST_TAIL, "-minidvodbcopy_id",        0, "search by minidvodb_name", NULL);
    65     psMetadataAddStr(listminidvodbcopyArgs, PS_LIST_TAIL, "-destination_host",        0, "search by minidvodb.minidvodb_group", NULL);
     64    psMetadataAddStr(listminidvodbcopyArgs, PS_LIST_TAIL, "-minidvodbcopy_id",        0, "search by minidvodbcopy_id", NULL);
     65    psMetadataAddStr(listminidvodbcopyArgs, PS_LIST_TAIL, "-minidvodb_group",         0, "search by minidvodbRun.minidvodb_group", NULL);
     66    psMetadataAddStr(listminidvodbcopyArgs, PS_LIST_TAIL, "-destination_host",        0, "search by minidvodbCopy.destination_host", NULL);
     67    psMetadataAddBool(listminidvodbcopyArgs, PS_LIST_TAIL, "-pending",        0, "limit to pending items", false);
    6668    psMetadataAddU64(listminidvodbcopyArgs, PS_LIST_TAIL, "-limit",        0, "limit to N items", 0);
    6769    psMetadataAddBool(listminidvodbcopyArgs, PS_LIST_TAIL, "-simple",        0, "simple output", false);
     
    7274    psMetadataAddU64(revertminidvodbcopyArgs, PS_LIST_TAIL, "-minidvodb_id",        0, "search by minidvodb_id", 0);
    7375    psMetadataAddStr(revertminidvodbcopyArgs, PS_LIST_TAIL, "-destination_host",        0, "search by destination_host", NULL);
    74 
     76    psMetadataAddS16(revertminidvodbcopyArgs, PS_LIST_TAIL, "-fault",        0, "search by minidvodbCopyfault", 0);
    7577    psMetadata *updateminidvodbcopyArgs = psMetadataAlloc();
    7678    psMetadataAddU64(updateminidvodbcopyArgs, PS_LIST_TAIL, "-minidvodbcopy_id",        0, "search by minidvodbcopy_id", 0);
Note: See TracChangeset for help on using the changeset viewer.