IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25517


Ignore:
Timestamp:
Sep 23, 2009, 3:47:26 PM (17 years ago)
Author:
bills
Message:

Require that magic have been run before distributing even if the run
is clean. Clean runs still need to run censorObjects

File:
1 edited

Legend:

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

    r25513 r25517  
    223223        }
    224224    } else if (!strcmp(stage, "camera")) {
    225         magicRunType = "chipRun";    // This is used below to set the magicked business
     225        magicRunType = "camRun";    // This is used below to set the magicked business
     226        runJoinStr = "camRun.cam_id";
    226227        query = pxDataGet("disttool_definebyquery_camera.sql");
    227228        if (!query) {
     
    288289            psStringAppend(&query, " AND (stackRun.label = '%s')", label);
    289290        }
    290         // stack stage doesn't require magic (perhaps let the script do this?
     291        // stack stage doesn't require magic
    291292        no_magic = true;
    292293    } else {
     
    306307
    307308    if (!no_magic) {
    308         psStringAppend(&query, " AND (distTarget.clean OR %s.magicked)", magicRunType);
     309        psStringAppend(&query, " AND (%s.magicked)", magicRunType);
    309310
    310311        // is selecting by magic_ds_id really interesting?
    311312        if (magic_ds_id) {
    312             if (strcmp(stage, "camera")) {
    313                 // stage other than camera
    314                 if (!runJoinStr) {
    315                     psError(PS_ERR_PROGRAMMING, true, "cannot select by magic_ds_id for stage: %s", stage);
    316                     psFree(query);
    317                     return false;
    318                 }
    319                 psStringAppend(&joinHook, "\nJOIN magicDSRun ON magicDSRun.stage = distTarget.stage"
     313            if (!runJoinStr) {
     314                psError(PS_ERR_PROGRAMMING, true, "cannot select by magic_ds_id for stage: %s", stage);
     315                psFree(query);
     316                return false;
     317            }
     318            psStringAppend(&joinHook, "\nJOIN magicDSRun ON magicDSRun.stage = distTarget.stage"
    320319                                              " AND magicDSRun.stage_id = %s", runJoinStr);
    321             } else {
    322                 // camera masks are magicked when the chipRun is magicked
    323                 // XXX: This is confusing. Is it dangerous?
    324                 // Maybe I should add a magicked bit to camRun. Note this isn't
    325                 psStringAppend(&joinHook, "\nJOIN magicDSRun ON magicDSRun.stage = 'chip'"
    326                                               " AND magicDSRun.stage_id = chipRun.chip_id");
    327             }
    328320            psStringAppend(&query, " AND (magicDSRun.state = 'full' AND magicDSRun.re_place AND (magic_ds_id = %" PRId64 "))", magic_ds_id);
    329321        }
Note: See TracChangeset for help on using the changeset viewer.