IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28319


Ignore:
Timestamp:
Jun 14, 2010, 5:02:11 PM (16 years ago)
Author:
Paul Price
Message:

Additional search options for pubtool -definerun. Support publishing data in cleaned state (detections should still be there).

Location:
trunk/ippTools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/share/pubtool_definerun.sql

    r27041 r28319  
    66FROM (
    77    -- Get diffs to publish
    8     SELECT
     8    SELECT DISTINCT
    99        client_id,
    1010        diff_id AS stage_id,
     
    1212    FROM publishClient
    1313    JOIN diffRun
     14    JOIN diffInputSkyfile USING(diff_id)
     15    JOIN warpRun ON warpRun.warp_id = diffInputSkyfile.warp1 -- Only JOINing input, not reference!
     16    JOIN fakeRun USING(fake_id)
     17    JOIN camRun USING(cam_id)
     18    JOIN chipRun USING(chip_id)
     19    JOIN rawExp USING(exp_id)
    1420    WHERE publishClient.stage = 'diff'
    1521        AND publishClient.active = 1
    16         AND diffRun.state = 'full'
     22        AND diffRun.state IN ('full', 'cleaned', 'goto_cleaned')
    1723        AND (diffRun.magicked > 0 OR diffRun.diff_mode = 4 OR publishClient.magicked = 0)
    1824    -- WHERE hook %s
     
    2531    FROM publishClient
    2632    JOIN camRun
     33    JOIN chipRun USING(chip_id)
     34    JOIN rawExp USING(exp_id)
    2735    WHERE publishClient.stage = 'camera'
    2836        AND publishClient.active = 1
    29         AND camRun.state = 'full'
     37        AND camRun.state IN ('full', 'cleaned', 'goto_cleaned')
    3038        AND (camRun.magicked > 0 OR publishClient.magicked = 0)
    3139    -- WHERE hook %s
     
    3341-- Only get stuff that hasn't been published
    3442LEFT JOIN publishRun USING(client_id, stage_id)
    35 WHERE publishRun.client_id IS NULL
  • trunk/ippTools/share/pubtool_pending.sql

    r27052 r28319  
    2626        AND publishClient.active = 1
    2727        AND publishRun.state = 'new'
    28         AND diffRun.state = 'full'
     28        AND diffRun.state IN ('full', 'cleaned', 'goto_cleaned')
    2929        AND (diffRun.magicked > 0 OR diffRun.diff_mode = 4 OR publishClient.magicked = 0)
    3030        -- WHERE hook %s
     
    4747        AND publishClient.active = 1
    4848        AND publishRun.state ='new'
    49         AND camRun.state = 'full'
     49        AND camRun.state IN ('full', 'cleaned', 'goto_cleaned')
    5050        AND (camRun.magicked > 0 OR publishClient.magicked = 0)
    5151        -- WHERE hook %s
  • trunk/ippTools/src/pubtool.c

    r27071 r28319  
    157157    // optional
    158158    PXOPT_COPY_S64(config->args, where, "-client_id", "client_id", "==");
    159     pxAddLabelSearchArgs(config, where, "-label", "label", "=="); // define using newExp label
     159    pxAddLabelSearchArgs(config, where, "-label", "label", "==");
     160    pxAddLabelSearchArgs(config, where, "-data_group", "data_group", "==");
     161    PXOPT_COPY_TIME(config->args, where, "-dateobs_begin", "rawExp.dateobs", ">=");
     162    PXOPT_COPY_TIME(config->args, where, "-dateobs_end", "rawExp.dateobs", "<=");
     163    PXOPT_COPY_STR(config->args, where, "-filter", "rawExp.filter", "LIKE");
     164    PXOPT_COPY_STR(config->args, where, "-obs_mode", "rawExp.obs_mode", "LIKE");
     165
     166    PXOPT_LOOKUP_BOOL(rerun, config->args, "-rerun", false);
    160167
    161168    psString query = pxDataGet("pubtool_definerun.sql"); // Query to run
     
    164171        psFree(where);
    165172        return false;
     173    }
     174
     175    if (!rerun) {
     176        psStringAppend(&query, "WHERE publishRun.client_id IS NULL");
    166177    }
    167178
     
    241252    PXOPT_COPY_STR(config->args, where, "-stage", "publishClient.stage", "==");
    242253    PXOPT_COPY_STR(config->args, where, "-comment", "publishClient.comment", "LIKE");
    243     PXOPT_COPY_STR(config->args, where, "-label", "publishRun.label", "==");
     254    pxAddLabelSearchArgs(config, where, "-label", "label", "==");
    244255
    245256    // optional
  • trunk/ippTools/src/pubtoolConfig.c

    r27311 r28319  
    6464    psMetadataAddS64(definerunArgs, PS_LIST_TAIL, "-client_id", 0, "search by client_id", 0);
    6565    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "set and search by label", NULL);
     66    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-data_group", PS_META_DUPLICATE_OK, "search by data_group", NULL);
     67    psMetadataAddBool(definerunArgs, PS_LIST_TAIL, "-rerun", 0, "Re-run publish?", false);
     68    psMetadataAddTime(definerunArgs, PS_LIST_TAIL, "-dateobs_begin", 0, "search for exposures by time (>=)", NULL);
     69    psMetadataAddTime(definerunArgs, PS_LIST_TAIL, "-dateobs_end", 0, "search for exposures by time (<=)", NULL);
     70    psMetadataAddStr(definerunArgs,  PS_LIST_TAIL, "-filter", 0, "search for filter", NULL);
     71    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-obs_mode", 0, "search by observation mode", NULL);
     72
    6673
    6774    // -pending
     
    7077    psMetadataAddStr(pendingArgs, PS_LIST_TAIL, "-stage", 0, "search on source", NULL);
    7178    psMetadataAddStr(pendingArgs, PS_LIST_TAIL, "-comment", 0, "search on comment (LIKE)", NULL);
    72     psMetadataAddStr(pendingArgs, PS_LIST_TAIL, "-label", 0, "search on label", NULL);
     79    psMetadataAddStr(pendingArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search on label", NULL);
    7380    psMetadataAddBool(pendingArgs, PS_LIST_TAIL, "-simple",  0, "use simple output format?", false);
    7481    psMetadataAddU64(pendingArgs, PS_LIST_TAIL, "-limit",  0, "limit result set", 0);
Note: See TracChangeset for help on using the changeset viewer.