IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15779


Ignore:
Timestamp:
Dec 10, 2007, 1:13:34 PM (18 years ago)
Author:
eugene
Message:

added -uri to the my_die function

File:
1 edited

Legend:

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

    r15777 r15779  
    130130);
    131131
     132my $now_time = localtime();
     133printf STDERR "\nstarting ppStats: %s\n", $now_time;
     134
    132135# Run ppStats on the input file
    133136{
     
    138141    unless ($success) {
    139142        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    140         &my_die ("Unable to perform ppStats on exposure id $exp_id: $error_code", $exp_id, $tmp_exp_name, $tmp_class_id, $error_code);
     143        &my_die ("Unable to perform ppStats on exposure id $exp_id: $error_code", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $error_code);
    141144    }
    142145   
     
    145148    my $metadata = $mdcParser->parse(join "", @$stdout_buf); # XXX is this join necessary?
    146149    unless ($metadata) {
    147         &my_die ("Unable to parse metadata config doc", $exp_id, $tmp_exp_name, $tmp_class_id, $PS_EXIT_PROG_ERROR);
     150        &my_die ("Unable to parse metadata config doc", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_PROG_ERROR);
    148151    }
    149152
    150153    # extract the stats from the metadata
    151154    unless ($stats->parse($metadata)) {
    152         &my_die ("Unable to find all values", $exp_id, $tmp_exp_name, $tmp_class_id, $PS_EXIT_CONFIG_ERROR);
    153     }
    154 }
     155        &my_die ("Unable to find all values", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR);
     156    }
     157}
     158
     159$now_time = localtime();
     160printf STDERR "\ndone with ppStats: %s\n", $now_time;
    155161
    156162# we require at a minimum: -telescope, -inst, -filelevel, -class_id, -exp_type
    157 if (uc($stats->value_for_flag ("-telescope")) eq "NULL") { &my_die ("telescope not found", $exp_id, $tmp_exp_name, $tmp_class_id, $PS_EXIT_CONFIG_ERROR); }
    158 if (uc($stats->value_for_flag ("-inst"))      eq "NULL") { &my_die ("inst      not found", $exp_id, $tmp_exp_name, $tmp_class_id, $PS_EXIT_CONFIG_ERROR); }
    159 if (uc($stats->value_for_flag ("-filelevel")) eq "NULL") { &my_die ("filelevel not found", $exp_id, $tmp_exp_name, $tmp_class_id, $PS_EXIT_CONFIG_ERROR); }
    160 if (uc($stats->value_for_flag ("-class_id"))  eq "NULL") { &my_die ("class_id  not found", $exp_id, $tmp_exp_name, $tmp_class_id, $PS_EXIT_CONFIG_ERROR); }
    161 if (uc($stats->value_for_flag ("-exp_type"))  eq "NULL") { &my_die ("exp_type  not found", $exp_id, $tmp_exp_name, $tmp_class_id, $PS_EXIT_CONFIG_ERROR); }
     163if (uc($stats->value_for_flag ("-telescope")) eq "NULL") { &my_die ("telescope not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
     164if (uc($stats->value_for_flag ("-inst"))      eq "NULL") { &my_die ("inst      not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
     165if (uc($stats->value_for_flag ("-filelevel")) eq "NULL") { &my_die ("filelevel not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
     166if (uc($stats->value_for_flag ("-class_id"))  eq "NULL") { &my_die ("class_id  not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
     167if (uc($stats->value_for_flag ("-exp_type"))  eq "NULL") { &my_die ("exp_type  not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
    162168
    163169my $command = "$regtool -addprocessedimfile";
     
    168174$command .= " -dbname $dbname" if defined $dbname;
    169175$command .= $stats->cmdflags();
     176
     177$now_time = localtime();
     178printf STDERR "\nrunning regtool update: %s\n", $now_time;
    170179
    171180# Push the results into the database
     
    182191}
    183192
     193$now_time = localtime();
     194printf STDERR "\ndone with regtool update: %s\n", $now_time;
     195
    184196sub cache_run
    185197{
     
    202214    my $exp_name = shift;
    203215    my $tmp_class_id = shift;
     216    my $uri = shift;
    204217    my $exit_code = shift;
    205218
     
    212225        $command .= " -exp_name $exp_name";
    213226        $command .= " -tmp_class_id $tmp_class_id";
     227        $command .= " -uri $uri ";
    214228        $command .= " -telescope UNKNOWN";
    215229        $command .= " -inst UNKNOWN";
Note: See TracChangeset for help on using the changeset viewer.