IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28755


Ignore:
Timestamp:
Jul 28, 2010, 4:19:30 PM (16 years ago)
Author:
rhenders
Message:

added 'don't tar and zip' option; passing save_temps to other classes; storing batch type in ippToPsps Db; neatened up args

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/perl/ippToPsps_run.pl

    r28699 r28755  
    1515use ippToPsps::IppToPspsDb;
    1616
    17 
    1817# globals
    19 my ($verbose, $save_temps, $no_op, $no_update, $camera, $batchType, $output, $dvodb, $datastoreProduct, $survey, $singleExpId, $force, $initBatch, $help);
    20 
    21 # default values for certain globals
    22 $verbose = undef;
    23 $save_temps = undef;
    24 $no_update = undef;
    25 $camera = 'GPC1';
    26 $output = undef;
    27 $singleExpId = undef;
    28 $datastoreProduct = undef;
    29 $force = undef;
    30 $initBatch = 0;
     18my $camera = 'GPC1';
     19my $batchType = undef;
     20my $survey = undef;
     21my $dvodb = undef;
     22my $verbose = undef;
     23my $save_temps = undef;
     24my $no_update = undef;
     25my $output = undef;
     26my $singleExpId = undef;
     27my $datastoreProduct = undef;
     28my $force = undef;
     29my $initBatch = undef;
     30my $dontTarNZip = undef;
    3131
    3232# get user args
     
    4242        'no-update|u' => \$no_update,
    4343        'force|f' => \$force,
     44        'tarnzip|z' => \$dontTarNZip,
    4445        );
    4546
     
    6869if (!defined $force) {
    6970    print "* OPTIONAL: force if already processed :    -f\n"; $force = 0;}
     71if (!defined $dontTarNZip) {
     72    print "* OPTIONAL: don't tar and zip output :      -z\n"; $dontTarNZip = 0;}
    7073    print "*\n*******************************************************************************\n";
    7174
    7275if ($quit) { exit; }
    7376
    74 my $gpc1Db = new ippToPsps::Gpc1Db("gpc1", "ippdb01", "ippuser", "ippuser", $verbose);
    75 my $ippToPspsDb = new ippToPsps::IppToPspsDb("ippToPsps", "ippdb01", "ipp", "ipp", $verbose);
     77my $gpc1Db = new ippToPsps::Gpc1Db("gpc1", "ippdb01", "ippuser", "ippuser", $verbose, $save_temps);
     78my $ippToPspsDb = new ippToPsps::IppToPspsDb("ippToPsps", "ippdb01", "ipp", "ipp", $verbose, $save_temps);
    7679
    7780# check we can run programs and get camera config
     
    8184
    8285if ($batchType eq "init") {$initBatch = 1;}
     86else {$initBatch = 0;}
    8387process();
    8488
     
    146150        if (!$surveyType) {next;}
    147151
    148         $batchId = $ippToPspsDb->getNewBatchId($expId, $surveyType);
     152        $batchId = $ippToPspsDb->getNewBatchId($expId, $surveyType, $batchType);
    149153
    150154        # TODO quit here if no sensible batch ID
     
    167171            if (writeBatchManifest($batchDir, $batch, $batchType, $surveyType, $filename, $minObjId, $maxObjId)) {
    168172
    169                 my $tarball = tarAndZipBatch($output, $batch);
    170                 if ($tarball && $datastoreProduct && publishToDatastore($batch, $output, $tarball)) {$published = 1;}
     173                if (!$dontTarNZip) {
     174                    my $tarball = tarAndZipBatch($output, $batch);
     175                    if ($tarball && $datastoreProduct && publishToDatastore($batch, $output, $tarball)) {$published = 1;}
     176                }
    171177            }
    172178
Note: See TracChangeset for help on using the changeset viewer.