- Timestamp:
- Mar 5, 2012, 5:19:48 PM (14 years ago)
- Location:
- branches/meh_branches/ppstack_test
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/diff_skycell.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppstack_test
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/ippScripts/scripts/diff_skycell.pl
r31941 r33415 40 40 my ($skycell_id, $diff_skyfile_id); 41 41 my ($use_convolved); 42 my $zaplog = 0;43 42 44 43 GetOptions( … … 57 56 'no-op' => \$no_op, # Don't do any operations? 58 57 'redirect-output' => \$redirect, 59 'zaplog' => \$zaplog, # delete any previous log file60 58 ) or pod2usage( 2 ); 61 59 … … 79 77 80 78 # XXX camera is not known here; cannot use filerules... 81 # bills 2011-03-07 This is unfortunate because it prevents us from using prepare_output ...82 # my $logDest = $ipprc->filename("LOG.EXP", $outroot);83 79 my $logDest = "$outroot.log"; 84 80 if ($run_state eq 'update') { 85 81 $logDest .= '.update'; 86 # ... well we can just do the dirty work here 87 $ipprc->kill_file($logDest); 88 } elsif ($zaplog) { 89 $ipprc->kill_file($logDest); 90 } 91 $ipprc->redirect_output($logDest) or my_die( "Unable to redirect output", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR ) if $redirect; 82 } 83 $ipprc->redirect_to_logfile($logDest) or my_die( "Unable to redirect output", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR ) if $redirect; 92 84 93 85 my $source_id = $ipprc->source_id($dbname, $PS_TABLE_ID_DIFF); … … 285 277 $outputStats = prepare_output("SKYCELL.STATS.UPDATE", $outroot, 1); 286 278 $configuration = $ipprc->filename("PPSUB.CONFIG", $outroot); 287 if (!$ipprc->file_exists($configuration)) { 288 print STDERR "WARNING: Config dump file $configuration is missing. Using current recipes and file rules.\n"; 289 $configuration = undef; 290 } 279 # XXX: Work around problem with updating old diff runs. Their config files are incompatible 280 # with the current code. 281 if ($camera ne 'GPC1' or $diff_id >= 88268) { 282 if (!$ipprc->file_exists($configuration)) { 283 print STDERR "WARNING: Config dump file $configuration is missing. Using current recipes and file rules.\n"; 284 $configuration = undef; 285 } 286 } else { 287 print STDERR "WARNING: Using new recipes because config dump file is too old\n"; 288 $configuration = undef; 289 } 290 291 291 # use WARPSTATS if we're updating, as we don't care about the new stuff from the STACK and DIFF STATS recipes 292 292 $recipe_ppstats = 'WARPSTATS'; … … 468 468 &my_die("Couldn't find expected output file: $file", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($file); 469 469 470 # Funpack to confirm we've really made things correctly 471 my $diskfile = $ipprc->file_resolve($file); 472 if ($diskfile =~ /fits/) { 473 my $funpack = can_run('funpack') or &my_die ("Can't find funpack", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR); 474 my $check_command = "$funpack -S $diskfile > /dev/null"; 475 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 476 run(command => $check_command, verbose => $verbose); 477 if (!$success) { 478 &my_die("Output file not a valid fits file: $file", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR); 479 } 480 } 481 ##### 482 483 470 484 if ($replicate and $neb) { 471 485 $ipprc->replicate_file($file) or &my_die("failed to replicate: $file\n", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR);
Note:
See TracChangeset
for help on using the changeset viewer.
