IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 18, 2024, 2:55:58 PM (2 years ago)
Author:
cclin33
Message:

fix mis-match mosaic issue when running addstar, optimize addstar program

File:
1 edited

Legend:

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

    r41213 r42712  
    140140    PXOPT_LOOKUP_BOOL(uncensored, config->args, "-uncensored", false);
    141141    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
     142    PXOPT_LOOKUP_BOOL(addrand, config->args,  "-addrand", false);
    142143
    143144    PXOPT_LOOKUP_BOOL(pretend,    config->args, "-pretend", false);
     
    424425    else if (strcmp(stage,"fullforce_summary") == 0) {
    425426      psStringAppend(&query, " GROUP BY ff_id ");  //needs to be checked, but should be fine: want 1 ff summary cmf.
     427    }
     428
     429    // random order of pending files
     430    if (addrand) {
     431      psStringAppend(&query, " order by rand()");
    426432    }
    427433
     
    10891095    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
    10901096    PXOPT_LOOKUP_BOOL(multiadd, config->args, "-multiadd", false);
     1097    PXOPT_LOOKUP_BOOL(addrand, config->args,  "-addrand", false);
    10911098   
    10921099    psString query = NULL;
     
    11251132        psStringAppend(&query, " AND %s", whereClause);
    11261133        psFree(whereClause);
     1134    }
     1135    // random order of pending files
     1136    if (addrand) {
     1137      psStringAppend(&query, " ORDER BY RAND()");
    11271138    }
    11281139    psFree(where);
Note: See TracChangeset for help on using the changeset viewer.