IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38225 for trunk/ippScripts


Ignore:
Timestamp:
May 4, 2015, 5:52:38 PM (11 years ago)
Author:
watersc1
Message:

Changes to be more device agnostic. Require dbname and camera be supplied on command line, and sort and determine a unique set of filters (to work around ppConfigDump MULTI merge bug).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/nightly_science.pl

    r36691 r38225  
    122122    defined $test_mode or defined $clean_old or defined $check_mode or
    123123    defined $confirm_stacks or defined $burntool_status;
     124pod2usage(
     125          -msg => "Explicitly choose --dbname and --camera",
     126    -exitval => 3,
     127    ) unless (defined($camera) and defined($dbname));
    124128
    125129# Configurable parameters from our config file.
     
    132136my @unrecoverable_quality = ();
    133137my @filter_list = ();
     138my %unique_filter_hash = ();
    134139
    135140# Grab the configuration data.
    136 my $conf_cmd = "$ppConfigDump -dump-recipe NIGHTLY_SCIENCE -";
     141my $conf_cmd = "$ppConfigDump -camera $camera -dump-recipe NIGHTLY_SCIENCE -";
    137142my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    138143    run(command => $conf_cmd, verbose => $verbose);
     
    161166    }
    162167    elsif (${ $entry }{name} eq 'FILTERS') {
    163         push @filter_list, ${ $entry }{value};
     168        $unique_filter_hash{ ${ $entry }{value} } = 1;
     169#        push @filter_list, ${ $entry }{value};
    164170    }
    165171    elsif (${ $entry }{name} eq 'UNRECOVERABLE_QUALITY') {
     
    216222    }
    217223}
     224@filter_list = sort(keys(%unique_filter_hash));
    218225
    219226if (defined($date)) {
     
    246253    $datetime = DateTime->now(time_zone => 'UTC'); # time_zone   => 'Pacific/Honolulu');
    247254    $date = $datetime->ymd();
    248 }
    249 unless(defined($camera)) {
    250     $camera = 'GPC1';
    251 }
    252 unless(defined($dbname)) {
    253     $dbname = 'gpc1';
    254255}
    255256
Note: See TracChangeset for help on using the changeset viewer.