Changeset 15779
- Timestamp:
- Dec 10, 2007, 1:13:34 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/register_imfile.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/register_imfile.pl
r15777 r15779 130 130 ); 131 131 132 my $now_time = localtime(); 133 printf STDERR "\nstarting ppStats: %s\n", $now_time; 134 132 135 # Run ppStats on the input file 133 136 { … … 138 141 unless ($success) { 139 142 $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); 141 144 } 142 145 … … 145 148 my $metadata = $mdcParser->parse(join "", @$stdout_buf); # XXX is this join necessary? 146 149 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); 148 151 } 149 152 150 153 # extract the stats from the metadata 151 154 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(); 160 printf STDERR "\ndone with ppStats: %s\n", $now_time; 155 161 156 162 # 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); }163 if (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); } 164 if (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); } 165 if (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); } 166 if (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); } 167 if (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); } 162 168 163 169 my $command = "$regtool -addprocessedimfile"; … … 168 174 $command .= " -dbname $dbname" if defined $dbname; 169 175 $command .= $stats->cmdflags(); 176 177 $now_time = localtime(); 178 printf STDERR "\nrunning regtool update: %s\n", $now_time; 170 179 171 180 # Push the results into the database … … 182 191 } 183 192 193 $now_time = localtime(); 194 printf STDERR "\ndone with regtool update: %s\n", $now_time; 195 184 196 sub cache_run 185 197 { … … 202 214 my $exp_name = shift; 203 215 my $tmp_class_id = shift; 216 my $uri = shift; 204 217 my $exit_code = shift; 205 218 … … 212 225 $command .= " -exp_name $exp_name"; 213 226 $command .= " -tmp_class_id $tmp_class_id"; 227 $command .= " -uri $uri "; 214 228 $command .= " -telescope UNKNOWN"; 215 229 $command .= " -inst UNKNOWN";
Note:
See TracChangeset
for help on using the changeset viewer.
