IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28339


Ignore:
Timestamp:
Jun 15, 2010, 1:57:07 PM (16 years ago)
Author:
bills
Message:

implement ordering by Label.priority for camtool -processedexp
Needed to stop sharing the sql to implement this

Location:
trunk/ippTools
Files:
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/share/Makefile.am

    r28266 r28339  
    1818     addtool_revertminidvodbprocessed.sql \
    1919     addtool_revertprocessedexp.sql \
     20     camtool_addprocessedexp.sql \
    2021     camtool_donecleanup.sql \
    2122     camtool_find_chip_id.sql \
    22      camtool_find_pendingexp.sql \
     23     camtool_pendingexp.sql \
    2324     camtool_find_pendingimfile.sql \
    2425     camtool_find_processedexp.sql \
  • trunk/ippTools/share/camtool_pendingexp.sql

    r28306 r28339  
    1 -- this query is used by both camtool -pendingexp & camtool -addprocessedexp it
    2 -- does a little more work then is necessary for -addprocessed but it seems
    3 -- "cleaner" to use the same query for both cases
    41SELECT
    52    camRun.*,
     
    118    rawExp.filelevel,
    129    chipRun.magicked AS chip_magicked,
    13     camProcessedExp.path_base
     10    camProcessedExp.path_base,
     11    IFNULL(Label.priority, 10000) AS priority
    1412FROM camRun
    1513JOIN chipRun
     
    2119LEFT JOIN camMask
    2220    ON camRun.label = camMask.label
     21LEFT JOIN Label
     22    ON camRun.label = Label.label
    2323WHERE
    2424    chipRun.state = 'full'
    2525    AND ((camRun.state = 'new' AND camProcessedExp.cam_id IS NULL) OR camRun.state = 'update')
    2626    AND camMask.label IS NULL
     27    AND (Label.active OR Label.active IS NULL)
  • trunk/ippTools/src/camtool.c

    r28274 r28339  
    292292    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
    293293
    294     psString query = pxDataGet("camtool_find_pendingexp.sql");
     294    psString query = pxDataGet("camtool_pendingexp.sql");
    295295    if (!query) {
    296296        psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");
     
    305305    }
    306306    psFree(where);
     307
     308    psStringAppend(&query, "\nORDER BY priority DESC, cam_id");
    307309
    308310    // treat limit == 0 as "no limit"
     
    531533    PXOPT_COPY_S64(config->args, where, "-cam_id",   "camRun.cam_id",   "==");
    532534
    533     psString query = pxDataGet("camtool_find_pendingexp.sql");
     535    psString query = pxDataGet("camtool_addprocessedexp.sql");
    534536    if (!query) {
    535537        psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");
Note: See TracChangeset for help on using the changeset viewer.