- Timestamp:
- Nov 8, 2011, 2:44:12 PM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110906
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/diff_skycell.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110906
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20110906/ippScripts/scripts/diff_skycell.pl
r31941 r32630 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); … … 468 460 &my_die("Couldn't find expected output file: $file", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($file); 469 461 462 # Funpack to confirm we've really made things correctly 463 my $diskfile = $ipprc->file_resolve($file); 464 if ($diskfile =~ /fits/) { 465 my $funpack = can_run('funpack') or &my_die ("Can't find funpack", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR); 466 my $check_command = "$funpack -S $diskfile > /dev/null"; 467 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 468 run(command => $check_command, verbose => $verbose); 469 if (!$success) { 470 &my_die("Output file not a valid fits file: $file", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR); 471 } 472 } 473 ##### 474 475 470 476 if ($replicate and $neb) { 471 477 $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.
