IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33027


Ignore:
Timestamp:
Dec 27, 2011, 11:34:14 AM (15 years ago)
Author:
heather
Message:

this records which camRun smfs are ingested (0 = uncensored, # = magicked, but
it foudn the uncensored one), and fixes reverts for all

Location:
branches/haf_add201112
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/haf_add201112/ippScripts/scripts/addstar_run.pl

    r33023 r33027  
    3838}
    3939my $minidvodb_path;
     40my $stage_extra1;
    4041my ( $add_id, $camera, $stage, $stage_id, $multi_num, $outroot, $stageroot, $dbname, $reduction, $dvodb, $minidvodb, $minidvodb_name, $minidvodb_group, $image_only, $verbose, $no_update,
    4142     $no_op, $redirect, $save_temps);
     
    151152        #is this cam_id magicked or not?
    152153        if ($magicked) {
     154            $stage_extra1 = $magicked;
    153155            $fpaObjects = $ipprc->destreaked_filename("$fpaObjects") or &my_die("Missing entry from camera config", $add_id, $PS_EXIT_CONFIG_ERROR);
    154156            print "cam_id is magicked, using $fpaObjects for the cam smf\n";
     
    251253$fpaCommand .= " -dvodb_path $minidvodb_path" if defined $minidvodb_path;
    252254$fpaCommand .= " -minidvodb_name $minidvodb_name" if defined $minidvodb_name;
     255$fpaCommand .= " -stage_extra1" if defined $stage_extra1;
    253256$fpaCommand .= " -dbname $dbname" if defined $dbname;
    254257print $fpaCommand;
     
    283286        $command .= " -path_base $outroot" if defined $outroot;
    284287        $command .= (" -dtime_addstar " . ((DateTime->now->mjd - $mjd_start) * 86400));
    285         $fpaCommand .= " -minidvodb_name $minidvodb_name" if defined $minidvodb_name;
     288   #     $command .= " -minidvodb_name $minidvodb_name" if defined $minidvodb_name; don't think we want it recorded (not sure)
     289        $command .= " -stage_extra1 $stage_extra1" if defined $stage_extra1;
    286290        $command .= " -dbname $dbname" if defined $dbname;
     291        print $command;
    287292        system ($command);
    288293    }
  • branches/haf_add201112/ippTasks/addstar.pro

    r33022 r33027  
    5353
    5454macro addstar.revert.off
    55   task addstar.revert
     55  task addstar.revert.cam
     56    active false
     57  end
     58 task addstar.revert.stack
     59    active false
     60  end
     61 task addstar.revert.staticsky
     62    active false
     63  end
     64 task addstar.revert.staticsky_multi
    5665    active false
    5766  end
    5867end
    5968macro addstar.revert.on
    60   task addstar.revert
     69  task addstar.revert.cam
     70    active true
     71  end
     72  task addstar.revert.stack
     73    active true
     74  end
     75  task addstar.revert.staticsky_multi
     76    active true
     77  end
     78  task addstar.revert.staticsky
    6179    active true
    6280  end
     
    6583
    6684# this variable will cycle through the known database names
    67 $addstar_DB = 0
    68 $addstar_revert_DB = 0
     85$addstar_DB = 0
     86#this may not work for more databases (addstar) will do that later)
     87$addstar_revert_DB_C = 0
     88$addstar_revert_DB_S = 0
     89$addstar_revert_DB_SS = 0
     90$addstar_revert_DB_SSM = 0
    6991
    7092
     
    415437end
    416438
    417 task addstar.revert
     439task addstar.revert.cam
    418440  host         local
    419441
     
    429451  task.exec
    430452    if ($LABEL:n == 0) break
    431     $run = addtool -revertprocessedexp
    432     if ($DB:n == 0)
    433       option DEFAULT
    434     else
    435       # save the DB name for the exit tasks
    436       option $DB:$addstar_revert_DB
    437       $run = $run -dbname $DB:$addstar_revert_DB
    438       $addstar_revert_DB ++
    439       if ($addstar_revert_DB >= $DB:n) set addstar_revert_DB = 0
     453    $run = addtool -revertprocessedexp -stage cam
     454    if ($DB:n == 0)
     455      option DEFAULT
     456    else
     457      # save the DB name for the exit tasks
     458      option $DB:$addstar_revert_DB_C
     459      $run = $run -dbname $DB:$addstar_revert_DB_C
     460      $addstar_revert_DB_C ++
     461      if ($addstar_revert_DB_C >= $DB:n) set addstar_revert_DB_C = 0
    440462    end
    441463    add_poll_labels run
     
    461483  end
    462484end
     485task addstar.revert.stack
     486  host         local
     487
     488  periods      -poll 5.0
     489  periods      -exec 60.0
     490  periods      -timeout 1200
     491  npending     1
     492  active        false
     493
     494  stdout NULL
     495  stderr $LOGDIR/revert.log
     496
     497  task.exec
     498    if ($LABEL:n == 0) break
     499    $run = addtool -revertprocessedexp -stage stack
     500    if ($DB:n == 0)
     501      option DEFAULT
     502    else
     503      # save the DB name for the exit tasks
     504      option $DB:$addstar_revert_DB_S
     505      $run = $run -dbname $DB:$addstar_revert_DB_S
     506      $addstar_revert_DB_S ++
     507      if ($addstar_revert_DB_S >= $DB:n) set addstar_revert_DB_S = 0
     508    end
     509    add_poll_labels run
     510    command $run
     511  end
     512
     513  # success
     514  task.exit    0
     515  end
     516
     517  # locked list
     518  task.exit    default
     519    showcommand failure
     520  end
     521
     522  task.exit    crash
     523    showcommand crash
     524  end
     525
     526  # operation times out?
     527  task.exit    timeout
     528    showcommand timeout
     529  end
     530end
     531task addstar.revert.staticsky
     532  host         local
     533
     534  periods      -poll 5.0
     535  periods      -exec 60.0
     536  periods      -timeout 1200
     537  npending     1
     538  active        false
     539
     540  stdout NULL
     541  stderr $LOGDIR/revert.log
     542
     543  task.exec
     544    if ($LABEL:n == 0) break
     545    $run = addtool -revertprocessedexp -stage staticsky
     546    if ($DB:n == 0)
     547      option DEFAULT
     548    else
     549      # save the DB name for the exit tasks
     550      option $DB:$addstar_revert_DB_SS
     551      $run = $run -dbname $DB:$addstar_revert_DB_SS
     552      $addstar_revert_DB_SS ++
     553      if ($addstar_revert_DB_SS >= $DB:n) set addstar_revert_DB_SS = 0
     554    end
     555    add_poll_labels run
     556    command $run
     557  end
     558
     559  # success
     560  task.exit    0
     561  end
     562
     563  # locked list
     564  task.exit    default
     565    showcommand failure
     566  end
     567
     568  task.exit    crash
     569    showcommand crash
     570  end
     571
     572  # operation times out?
     573  task.exit    timeout
     574    showcommand timeout
     575  end
     576end
     577task addstar.revert.staticsky_multi
     578  host         local
     579
     580  periods      -poll 5.0
     581  periods      -exec 60.0
     582  periods      -timeout 1200
     583  npending     1
     584  active        false
     585
     586  stdout NULL
     587  stderr $LOGDIR/revert.log
     588
     589  task.exec
     590    if ($LABEL:n == 0) break
     591    $run = addtool -revertprocessedexp -stage staticsky_multi
     592    if ($DB:n == 0)
     593      option DEFAULT
     594    else
     595      # save the DB name for the exit tasks
     596      option $DB:$addstar_revert_DB_SSM
     597      $run = $run -dbname $DB:$addstar_revert_DB_SSM
     598      $addstar_revert_DB_SSM ++
     599      if ($addstar_revert_DB_SSM >= $DB:n) set addstar_revert_DB_SSM = 0
     600    end
     601    add_poll_labels run
     602    command $run
     603  end
     604
     605  # success
     606  task.exit    0
     607  end
     608
     609  # locked list
     610  task.exit    default
     611    showcommand failure
     612  end
     613
     614  task.exit    crash
     615    showcommand crash
     616  end
     617
     618  # operation times out?
     619  task.exit    timeout
     620    showcommand timeout
     621  end
     622end
  • branches/haf_add201112/ippTools/src/addtool.c

    r33023 r33027  
    825825    PXOPT_LOOKUP_STR(minidvodb_name, config->args, "-minidvodb_name", false, false);
    826826    PXOPT_LOOKUP_S16(fault,         config->args, "-fault", false, false);
    827 
     827    PXOPT_LOOKUP_S64(stage_extra1, config->args, "-stage_extra1", false, false);
    828828    // generate restrictions
    829829    psMetadata *where = psMetadataAlloc();
     
    903903      }
    904904    }
    905 
     905    //if there is a stage_extra1, set it in addRun (it's not known until it is processed)
     906    if (stage_extra1) {
     907      psString setExtra = NULL;
     908      psStringAppend (&setExtra, "UPDATE addRun set stage_extra1 = %" PRId64, stage_extra1);
     909      psStringAppend (&setExtra, " where add_id = %" PRId64, row->add_id);
     910
     911      if (!p_psDBRunQuery(config->dbh, setExtra)) {
     912        if (!psDBRollback(config->dbh)) {
     913          psError(PS_ERR_UNKNOWN, false, "database error");
     914        }
     915        psError(PS_ERR_UNKNOWN, false, "database error");
     916
     917        return false;
     918      }
     919    }
    906920
    907921
     
    10501064    PXOPT_COPY_S64(config->args, where, "-add_id",    "addRun.add_id",         "==");
    10511065    PXOPT_COPY_S64(config->args, where, "-stage_id",    "addRun.stage_id",         "==");
    1052     PXOPT_LOOKUP_STR(stage,       config->args, "-stage", false, false);
     1066    PXOPT_LOOKUP_STR(stage,       config->args, "-stage", true, false);
    10531067    pxcamGetSearchArgs (config, where);
    10541068    pxAddLabelSearchArgs (config, where, "-label",    "addRun.label",     "==");
  • branches/haf_add201112/ippTools/src/addtoolConfig.c

    r33003 r33027  
    115115    psMetadataAddF32(addprocessedexpArgs, PS_LIST_TAIL, "-dtime_addstar", 0, "define elapsed time for DVO insertion (seconds)", NAN);
    116116    psMetadataAddS16(addprocessedexpArgs, PS_LIST_TAIL, "-fault",  0,            "set fault code", 0);
     117psMetadataAddS64(addprocessedexpArgs, PS_LIST_TAIL, "-stage_extra1",  0,            "set stage_extra1", 0);
     118
    117119
    118120    // -processedexp
Note: See TracChangeset for help on using the changeset viewer.