Changeset 33618
- Timestamp:
- Mar 28, 2012, 3:24:00 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/destreak_restore_camera.pl
r33602 r33618 21 21 use File::Temp qw( tempfile ); 22 22 use File::Basename qw( basename dirname ); 23 use File::Copy; 23 24 use PS::IPP::Metadata::Config; 24 25 use PS::IPP::Metadata::List qw( parse_md_list ); … … 33 34 my $missing_tools; 34 35 my $magicdstool = can_run('magicdstool') or (warn "Can't find magicdstool" and $missing_tools = 1); 35 my $isdestreaked = can_run('isdestreaked') or (warn "Can't find isdestreaked" and $missing_tools = 1); 36 my $ppConfigDump = can_run('ppConfigDump') or (warn "Can't find ppConfigDump" and $missing_tools = 1); 36 my $chiptool = can_run('chiptool') or (warn "Can't find chiptool" and $missing_tools = 1); 37 my $checkfits = can_run('checkfits') or (warn "Can't find checkfits" and $missing_tools = 1); 38 my $ftable = can_run('ftable') or (warn "Can't find ftable" and $missing_tools = 1); 39 my $censorObjects = can_run('censorObjects') or (warn "Can't find censorObjects" and $missing_tools = 1); 37 40 if ($missing_tools) { 38 41 warn("Can't find required tools."); … … 41 44 42 45 # Parse the command-line arguments 43 my ($magic_ds_id, $camera, $streaks, $ stage, $stage_id, $component, $uri, $path_base);46 my ($magic_ds_id, $camera, $streaks, $cam_id, $uri, $path_base); 44 47 my ($outroot, $release, $bytes, $md5sum); 45 48 my ($dbname, $save_temps, $verbose, $no_update, $no_op, $logfile); … … 47 50 GetOptions( 48 51 'magic_ds_id=s' => \$magic_ds_id,# Magic destreak run identifier 49 'camera=s' => \$camera, # camera for evaluating file rules 50 'stage=s' => \$stage, # raw, chip, warp, or diff 51 'stage_id=s' => \$stage_id, # exp_id, chip_id, warp_id, or diff_id 52 'camera=s' => \$camera, # path_base of the input 53 'cam_id=s' => \$cam_id, 52 54 'path_base=s' => \$path_base, # path_base of the input 53 55 'dbname=s' => \$dbname, # Database name … … 59 61 60 62 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 61 pod2usage( -msg => "Required options: --magic_ds_id --camera -- stage --stage_id --component--path_base",63 pod2usage( -msg => "Required options: --magic_ds_id --camera --cam_id --path_base", 62 64 -exitval => 3) unless 63 65 defined $magic_ds_id and 64 66 defined $camera and 65 defined $stage and 66 defined $stage_id and 67 defined $cam_id and 67 68 defined $path_base; 68 69 69 $component = "exposure";70 71 70 if ($camera ne 'GPC1') { 72 my_die("camera must be GPC1 not $camera ", $magic_ds_id, $component, $PS_EXIT_PROG_ERROR); 73 } 74 75 if ($stage ne 'camera') { 76 my_die("stage must be camera", $magic_ds_id, $component, $PS_EXIT_PROG_ERROR); 77 } 78 79 my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR ); # IPP configuration 80 81 $ipprc->redirect_to_logfile($logfile) or my_die( "Unable to redirect output", $magic_ds_id, $component, $PS_EXIT_SYS_ERROR ) if $logfile; 71 my_die("camera must be GPC1 not $camera ", $magic_ds_id, $PS_EXIT_PROG_ERROR); 72 } 73 74 my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $magic_ds_id, $PS_EXIT_CONFIG_ERROR ); # IPP configuration 75 76 $ipprc->redirect_to_logfile($logfile) or my_die( "Unable to redirect output", $magic_ds_id, $PS_EXIT_SYS_ERROR ) if $logfile; 82 77 83 78 my $nebulousServer = $ENV{NEB_SERVER}; 84 &my_die("cannot find NEB_SERVER in environment", $magic_ds_id, $ component, $PS_EXIT_CONFIG_ERROR) if !$nebulousServer;79 &my_die("cannot find NEB_SERVER in environment", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if !$nebulousServer; 85 80 86 81 my $nebulous = eval { Nebulous::Client->new( proxy => $nebulousServer ); }; 87 82 if ($@ or not defined $nebulous) { 88 &my_die ("Unable to create a Nebulous::Client object with proxy $nebulousServer", $magic_ds_id, $ component, $PS_EXIT_CONFIG_ERROR);83 &my_die ("Unable to create a Nebulous::Client object with proxy $nebulousServer", $magic_ds_id, $PS_EXIT_CONFIG_ERROR); 89 84 } 90 85 … … 95 90 my $nebulousInput = inNebulous($dirname); 96 91 97 &my_die ("$dirname is not in nebulous", $magic_ds_id, $ component, $PS_EXIT_CONFIG_ERROR) unless $nebulousInput;92 &my_die ("$dirname is not in nebulous", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) unless $nebulousInput; 98 93 99 94 my $backup_path_base = $dirname . "/SR_" . "$basename"; … … 103 98 my $bastrom = $ipprc->filename("PSASTRO.OUTPUT", $backup_path_base); 104 99 105 print "swap $bastrom and $astrom\n";106 100 restore_file($astrom, $bastrom, 1) or 107 &my_die("failed to restore smf file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 101 &my_die("failed to restore smf file", $magic_ds_id, $PS_EXIT_CONFIG_ERROR); 102 103 # Now restore the mask files 108 104 109 105 my @otas = qw(XY01 XY02 XY03 XY04 XY05 XY06 XY10 XY11 XY12 XY13 XY14 XY15 XY16 XY17 XY20 XY21 XY22 XY23 XY24 XY25 XY26 XY27 XY30 XY31 XY32 XY33 XY34 XY35 XY36 XY37 XY40 XY41 XY42 XY43 XY44 XY45 XY46 XY47 XY50 XY51 XY52 XY53 XY54 XY55 XY56 XY57 XY60 XY61 XY62 XY63 XY64 XY65 XY66 XY67 XY71 XY72 XY73 XY74 XY75 XY76); 110 106 111 # go fix the mask files112 107 foreach my $class_id (@otas) { 113 108 my $mask = "$path_base.$class_id.mk.fits"; 114 109 my $bmask = "$backup_path_base.$class_id.mk.fits"; 115 110 my $rmask = "$recovery_path_base.$class_id.mk.fits"; 116 restore_file($mask, $bmask, 0); 117 # or &my_die("failed to restore $mask", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 111 if (!restore_file($mask, $bmask, 0)) { 112 # no good mask file. Mark any chips that need this mask file to be useful as bad 113 # XXX: what about chipRuns with multiple camRuns can't we preserve those? 114 my $command = "$chiptool -dropprocessedimfile -cam_id $cam_id -class_id $class_id -set_quality 45"; 115 $command .= " -dbname $dbname" if defined $dbname; 116 unless ($no_update) { 117 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 118 run(command => $command, verbose => $verbose); 119 unless ($success) { 120 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 121 &my_die("Unable to perform magicdstool -addresult: $error_code", $magic_ds_id, 122 $error_code); 123 } 124 } else { 125 print "Skipping command: $command\n"; 126 } 127 } 118 128 } 119 129 120 130 { 121 # this sets the camRun's magicked value back to zero 131 # this sets the camRun's magicked value back to zero and deletes the magicDSFile 132 # row from the database 122 133 my $command = "$magicdstool -revertdestreakedfile -i_am_sure"; 123 134 $command .= " -state goto_restored"; 124 135 $command .= " -magic_ds_id $magic_ds_id"; 125 $command .= " -component $component";136 $command .= " -component exposure"; 126 137 $command .= " -dbname $dbname" if defined $dbname; 127 138 … … 132 143 unless ($success) { 133 144 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 134 &my_die("Unable to perform magicdstool -addresult: $error_code", $magic_ds_id, $component,145 &my_die("Unable to perform magicdstool -addresult: $error_code", $magic_ds_id, 135 146 $error_code); 136 147 } … … 139 150 } 140 151 } 152 { 153 # this sets the magicDSRun.state to restored 154 my $command = "$magicdstool -updaterun"; 155 $command .= " -set_state restored"; 156 $command .= " -magic_ds_id $magic_ds_id"; 157 $command .= " -dbname $dbname" if defined $dbname; 158 159 # Add the processed file to the database 160 unless ($no_update) { 161 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 162 run(command => $command, verbose => $verbose); 163 unless ($success) { 164 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 165 &my_die("Unable to perform magicdstool -addresult: $error_code", $magic_ds_id, 166 $error_code); 167 } 168 } else { 169 print "Skipping command: $command\n"; 170 } 171 } 141 172 exit 0; 142 173 143 174 ### Pau. 175 144 176 sub restore_file { 145 177 my $original_url = shift; … … 147 179 my $smf = shift; 148 180 149 my $original = check_file($original_url, 1); 181 print "\nStarting restore for $original_url\n"; 182 183 # It is the backup that we expect to want to use, check it first. 184 my $backup = check_file($backup_url, 1, $smf); 185 186 # Is backup a good file whether censored or not? 187 my $backup_ok = ($backup->{so_exists} and $backup->{num_instances}); 188 189 # Check original, skip full check if backup is ok and uncensored since the backup 190 # is the one that we want to keep. 191 my $original = check_file($original_url, (!$backup_ok or $backup->{censored}), $smf); 150 192 151 193 my $swap_urls = 0; … … 153 195 my $replicate = 0; 154 196 155 if ($original->{so_exists}) { 156 if ($original->{num_instances} == 0 or $original->{censored}) { 157 # expected case: censored original 158 # check the status of the backup 159 my $backup = check_file($backup_url, 1); 160 if ($backup->{so_exists}) { 161 if (!$backup->{censored}) { 162 # expected case backup is uncensored 163 if ($backup->{inconsistent}) { 164 if (!repair_file($backup), $smf) { 165 print STDERR "failed to repair uncensored backup file $backup_url\n"; 166 return 0; 167 } 168 } 169 # All systems go 197 if ($backup_ok and !$backup->{censored}) { 198 # 199 # Normal case. A good uncensored backup file is available 200 # 201 if ($backup->{inconsistent}) { 202 # At least one of the instances was bad. Repair. 203 repair_file($backup, $smf) or 204 &my_die( "failed to repair $backup_url", $magic_ds_id, $PS_EXIT_CONFIG_ERROR); 205 } 206 207 $replicate = $backup->{num_instances} < 2; 208 209 if ($original->{so_exists}) { 210 # 211 # Normal case. 212 # 213 $swap_urls = 1; 214 $kill_censored = 1; 215 } else { 216 # no file at original url rename the backup 217 # note: rename_file prints a message and dies on failure 218 rename_file($backup_url, $original_url); 219 } 220 } else { 221 # Something is wrong with the backup file, either not ok or censored 222 # check the original 223 my $original_ok = ($original->{so_exists} and $original->{num_instances}); 224 if ($original_ok) { 225 if ($original->{inconsistent}) { 226 repair_file($original, $smf) or 227 &my_die( "failed to repair $original_url", $magic_ds_id, $PS_EXIT_CONFIG_ERROR); 228 } 229 if (!$original->{censored}) { 230 # Note this is where we end up if this file has already been restored 231 print "Keeping uncensored file at original url: $original_url\n"; 232 } else { 233 print "No uncensored backup. Keeping censored file at original url: $original_url\n"; 234 } 235 $kill_censored = $backup->{so_exists}; 236 $replicate = $original->{num_instances} < 2; 237 } else { 238 # Original is bad. Is the backup at least a good file. If so swap it back in even if it is censored. 239 if ($backup_ok) { 240 print "No file found at $original_url\n"; 241 print "Swapping in $backup_url\n"; 242 if ($backup->{inconsistent}) { 243 repair_file($backup, $smf) or 244 &my_die( "failed to repair $backup_url", $magic_ds_id, $PS_EXIT_CONFIG_ERROR); 245 } 246 $replicate = $backup->{num_instances} < 2; 247 if ($original->{so_exists}) { 170 248 $swap_urls = 1; 171 249 $kill_censored = 1; 172 $replicate = $backup->{num_instances} < 2;173 250 } else { 174 # user intervention required 175 print STDERR "both original and backup url point to censored file names\n"; 176 my $name = $original->{instances}->[0]; 177 print STDERR " original: $name\n"; 178 $name = $backup->{instances}->[0]; 179 print STDERR " backup: $name\n"; 180 return 0; 251 # note: rename_file prints a message and dies on failure 252 rename_file($backup_url, $original_url); 181 253 } 182 254 } else { 183 print STDERR "no backup file exists: $backup_url\n"; 255 # we're out of luck 256 print "No good file for $original_url found\n"; 184 257 return 0; 185 258 } 186 } else { 187 # original exists but does not appear to be censored. Just have a quick look at the backup 188 my $backup = check_file($backup_url, 0); 189 if ($backup->{so_exists} and $backup->{num_instances} and !$backup->{censored}) { 190 # user intervention required 191 print STDERR "both original and backup url point to un-censored file names\n"; 192 my $name = $original->{instances}->[0]; 193 print STDERR " original: $name\n"; 194 $name = $backup->{instances}->[0]; 195 print STDERR " backup: $name\n"; 196 return 0; 197 } 198 if ($original->{inconsistent} or scalar @{$file->{bad_instances}} > 0) { 199 if (!repair_file($original, $smf)) { 200 print STDERR "failed to repair uncensored original file $original_url\n"; 201 return 0; 202 } 203 } 204 $kill_censored = 1; 205 $replicate = $original->{num_instances} < 2; 206 } 207 } else { 208 # no original storage object exists 209 # We could check for a backup and rename it but this should be a very unusual case 210 print STDERR "No storage object found for $original_url\n"; 211 return 0; 212 } 259 } 260 } 261 262 # Ok Now we know what we need to do so do it 213 263 214 264 if (!$no_op) { … … 217 267 print "failed to swap $backup_url\n"; 218 268 print " to $original_url\n"; 219 &my_die( "aborting", $magic_ds_id, $ component, $PS_EXIT_CONFIG_ERROR);269 &my_die( "aborting", $magic_ds_id, $PS_EXIT_CONFIG_ERROR); 220 270 } else { 221 271 print "restored $original_url\n"; … … 227 277 } 228 278 229 if ( !$replicate) {279 if ($replicate) { 230 280 $ipprc->replicate_file($original_url) 231 or &my_die( "failed to replicate $original_url", $magic_ds_id, $ component, $PS_EXIT_CONFIG_ERROR);281 or &my_die( "failed to replicate $original_url", $magic_ds_id, $PS_EXIT_CONFIG_ERROR); 232 282 } 233 283 } else { … … 244 294 my $url = shift; 245 295 my $full_check = shift; 296 my $smf = shift; 246 297 247 298 my %file; … … 260 311 my $stat = $nebulous->stat($url); 261 312 262 &my_die("nebulous stat failed for $url", $magic_ds_id, $ component, $PS_EXIT_CONFIG_ERROR) unless $stat;313 &my_die("nebulous stat failed for $url", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) unless $stat; 263 314 264 315 $file{total_instances} = $stat->[7]; … … 270 321 }; 271 322 if (!$instances or !scalar @$instances) { 323 print "No instances found for $url\n"; 272 324 return \%file; 273 325 } 274 326 275 my $first_inst; 276 my $first_size = 0; 277 my $first_md5 = ""; 278 my $first_censored ; 279 my $available_instances = 0; 327 my $good_inst; 328 my $good_size = 0; 329 my $good_md5 = ""; 330 my $good_censored ; 280 331 foreach my $inst (@$instances) { 281 332 $inst =~ s/file\:\/\///g; 282 333 283 334 if ( ! -e $inst) { 284 print STDERR"instance file $inst does not exist\n";335 print "instance file $inst does not exist\n"; 285 336 push @{$file{bad_instances}}, $inst; 286 337 next; … … 288 339 my $this_size = -s $inst; 289 340 if (!$this_size) { 290 print STDERR"instance file $inst has zero size\n";341 print "instance file $inst has zero size\n"; 291 342 push @{$file{bad_instances}}, $inst; 292 343 next; 293 344 } 294 $available_instances++; 295 push @{$file{instances}}, $inst; 296 my $this_md5 = $full_check ? file_md5_hex($inst) : ""; 297 if (!defined $first_inst) { 298 $first_inst = $inst; 299 $first_size = $this_size; 300 $first_md5 = $this_md5; 301 $first_censored = ($inst =~ /SR_/); 302 # unless full_check all we really care about is the censored status 345 346 my $this_censored = ($inst =~ /SR_/); 347 348 my $this_md5 = ""; 349 if ($full_check) { 350 $this_md5 = file_md5_hex($inst); 351 if ($smf) { 352 my $command = "$ftable -list $inst | grep psf | wc"; 353 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 354 run(command => $command, verbose => $verbose); 355 356 my $good = 0; 357 if ($success) { 358 my ($nchips) = split " ", join "", @$stdout_buf; 359 $nchips += 0; 360 if ($nchips and $nchips == 60) { 361 $good = 1; 362 } else { 363 print "$inst has less than 60 psf extensions: $nchips checking with censorObjects\n"; 364 my $command = "$censorObjects -checkinputonly -file $inst"; 365 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 366 run(command => $command, verbose => $verbose); 367 368 if ($success) { 369 $good = 1; 370 } else { 371 print "$command failed with error_code: $error_code\n", 372 } 373 } 374 } else { 375 print "$command failed with error_code: $error_code\n", 376 } 377 if (!$good) { 378 push @{$file{bad_instances}}, $inst; 379 next; 380 } 381 } else { 382 my $command = "$checkfits $inst"; 383 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 384 run(command => $command, verbose => $verbose); 385 unless ($success) { 386 print "$command failed with error_code: $error_code\n", 387 push @{$file{bad_instances}}, $inst; 388 next; 389 } 390 } 391 } 392 if (!defined $good_inst) { 393 $good_inst = $inst; 394 $good_size = $this_size; 395 $good_md5 = $this_md5; 396 $good_censored = $this_censored; 397 398 push @{$file{instances}}, $inst; 399 400 # unless we're asked for a full all really care about is the censored status 303 401 last if !$full_check; 304 } elsif ($this_size != $ first_size) {305 print STDERR "size of $inst $this_size is not equal to size of $first_inst: $first_size\n";402 } elsif ($this_size != $good_size) { 403 print "size of $inst $this_size is not equal to size of $good_inst: $good_size\n"; 306 404 $file{inconsistent} = 1; 307 } elsif ($this_md5 ne $first_md5) { 308 print STDERR "md5 of $inst $this_md5 is not equal to size of $first_inst: $first_md5\n"; 405 push @{$file{bad_instances}}, $inst; 406 } elsif ($this_md5 ne $good_md5) { 407 print "md5 of $inst $this_md5 is not equal to size of $good_inst: $good_md5\n"; 309 408 $file{inconsistent} = 1; 310 } 311 } 312 $file{num_instances} = $available_instances; 313 $file{censored} = $first_censored; 314 $file{size} = $first_size; 315 $file{md5} = $first_md5; 316 } 409 push @{$file{bad_instances}}, $inst; 410 } else { 411 # this matches the good instance 412 push @{$file{instances}}, $inst; 413 } 414 } 415 $file{num_instances} = scalar @{$file{instances}}; 416 $file{size} = $good_size; 417 $file{md5} = $good_md5; 418 if ($good_inst) { 419 $file{censored} = $good_censored; 420 } else { 421 # no good instances see if there was a bad one and check whether its url 422 # looks like a censored one 423 if (scalar @{$file{bad_instances}}) { 424 my $bad = ${$file{bad_instances}}->[0]; 425 $file{censored} = ($bad =~ /SR_/); 426 print "no good instances found setting censored based on $bad\n"; 427 } 428 } 429 } 430 } else { 431 print "No storage object found for $url \n"; 317 432 } 318 433 … … 320 435 } 321 436 437 sub rename_file { 438 if ($no_op) { 439 return 1; 440 } 441 442 my $original_url = shift; 443 my $backup_url = shift; 444 445 # rename the backup as the orig 446 print "No storage object for original url: $original_url\n"; 447 print "Replacing with file at : $backup_url\n"; 448 449 my $moved; 450 eval { 451 $moved = nebulous->move($backup_url, $original_url); 452 }; 453 if ($@ or not $moved) { 454 print "Failed to move $backup_url to $original_url\n"; 455 &my_die( "aborting", $magic_ds_id, $PS_EXIT_CONFIG_ERROR); 456 } 457 } 458 322 459 sub repair_file { 460 if ($no_op) { 461 return 1; 462 } 463 323 464 my $file = shift; 324 465 my $smf = shift; 325 if ($file->{num_instances} < 2) { 326 print STDERR "cannot repair file with only one instance\n"; 466 467 if ($file->{num_instances} < 1) { 468 print "cannot repair file with only no good instances\n"; 327 469 return 0; 328 470 } 329 my $good_inst; 330 my $good_size; 331 my $good_md5; 332 # try and find a "good instance" 333 my @good; 334 my $i; 335 for ($i = 0; $i < scalar @{$file->{instances}}; $i++; { 336 # assume the worst 337 $good[$i] = 0; 338 if (! -e $inst ) { 339 next; 340 } 341 my $size = -s $inst; 342 if (! $size ) { 343 next; 344 } 345 my $md5 = file_md5_hex($inst); 346 if ($good_inst) { 347 if (($size == $good_size) and ($md5 eq $good_md5)) { 348 $good[$i] = 1; 349 } 350 next; 351 } 352 353 if (!$smf) { 354 my $command = "$checkfits $inst"; 355 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 356 run(command => $command, verbose => $verbose); 357 if ($success) { 358 if (!$good_inst) { 359 $good_inst = $inst; 360 $good_$md5 = $md5; 361 $good_size = $size; 362 } 363 $good[$i] = 1; 364 } 365 } else { 366 # Need to write this program 367 my $command = "$checksmf $inst"; 368 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 369 run(command => $command, verbose => $verbose); 370 if ($success) { 371 if (!$good_inst) { 372 $good_inst = $inst; 373 $good_$md5 = $md5; 374 $good_size = $size; 375 } 376 $good[$i] = 1; 377 } 378 } 379 } 380 381 if (!$good_inst) { 382 print STDERR "unable to find any good instances of $file->{url}\n"; 383 return 0; 384 } 385 386 my $num_good = 0; 387 for (my $j = 0; $j <= $i; $j++) { 388 $num_good++ if $good[$j]; 389 } 390 for (my $j = 0; $j <= @{$file->{bad_instances}}; $j++) { 391 $good[$i++] = 0; 471 472 # file wouldn't get into instances array unless we decided that it was good in check_file 473 my $good_inst = $file->{instances}->[0]; 474 475 my $fixed = 0; 476 foreach my $bad_inst (@{$file->{bad_instances}}) { 477 print "Attempting to repair $bad_inst\n"; 478 479 my $parent_directory = dirname($bad_inst); 480 if (!-d $parent_directory) { 481 if (! mkdir $parent_directory) { 482 print "failed to mkdir parent directory $parent_directory\n"; 483 $fixed = 0; 484 last; 485 } 486 if (!copy $good_inst, $bad_inst) { 487 print "failed to copy $good_inst to $bad_inst\n"; 488 } 489 $fixed = 1; 490 push @{$file->{instances}}, $bad_inst; 491 } 392 492 } 393 493 394 395 return 0; 494 return $fixed; 396 495 } 397 496 … … 422 521 my $msg = shift; # Warning message on die 423 522 my $magic_ds_id = shift; # Magic DS identifier 424 my $component = shift; # class_id or skycell_id425 523 my $exit_code = shift; # Exit code to add 426 524 427 525 carp($msg); 428 429 $component = "exposure";430 526 431 527 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code;
Note:
See TracChangeset
for help on using the changeset viewer.
