IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31941


Ignore:
Timestamp:
Jul 27, 2011, 3:47:51 PM (15 years ago)
Author:
bills
Message:

add script to regenerate missing input files for a given component. Add flag
to tell the various scripts to delete existing log file (for use when the instance
is not available)

Location:
trunk
Files:
1 added
6 edited

Legend:

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

    r31905 r31941  
    4444my ( $exp_id, $chip_id, $class_id, $chip_imfile_id, $uri, $camera, $outroot, $dbname, $run_state, $reduction, $threads, $verbose,
    4545     $no_update, $save_temps, $no_op, $redirect, $magicked, $deburned );
     46
     47my $zaplog = 0;
     48
    4649GetOptions(
    4750    'exp_id=s'          => \$exp_id,    # Exposure identifier
     
    6265    'no-op'             => \$no_op,     # Don't do any operations?
    6366    'redirect-output'   => \$redirect,
     67    'zaplog'            => \$zaplog,
    6468    'save-temps'        => \$save_temps, # Save temporary files?
    6569    ) or pod2usage( 2 );
     
    9094my ($logDest, $traceDest);
    9195if ($run_state eq 'new') {
    92     $logDest = prepare_output("LOG.IMFILE", $outroot, $class_id, 0);
     96    $logDest = prepare_output("LOG.IMFILE", $outroot, $class_id, $zaplog);
    9397    $traceDest = prepare_output("TRACE.IMFILE",  $outroot, $class_id, 1);
    9498} else {
  • trunk/ippScripts/scripts/diff_skycell.pl

    r31435 r31941  
    4040my ($skycell_id, $diff_skyfile_id);
    4141my ($use_convolved);
     42my $zaplog = 0;
     43
    4244GetOptions(
    4345    'diff_id=s'         => \$diff_id, # Diff identifier
     
    5557    'no-op'             => \$no_op, # Don't do any operations?
    5658    'redirect-output'   => \$redirect,
     59    'zaplog'            => \$zaplog, # delete any previous log file
    5760) or pod2usage( 2 );
    5861
     
    8285    $logDest .= '.update';
    8386    # ... well we can just do the dirty work here
     87    $ipprc->kill_file($logDest);
     88} elsif ($zaplog) {
    8489    $ipprc->kill_file($logDest);
    8590}
  • trunk/ippScripts/scripts/warp_skycell.pl

    r31570 r31941  
    3838
    3939my ($warp_id, $skycell_id, $warp_skyfile_id, $tess_dir, $reduction, $camera, $dbname, $outroot, $threads, $run_state, $magicked, $verbose, $no_update, $no_op, $redirect, $save_temps);
     40my $zaplog = 0;
     41
    4042GetOptions(
    4143    'warp_id|i=s'         => \$warp_id, # Warp identifier
     
    5355    'no-update'           => \$no_update, # Don't update the database?
    5456    'no-op'               => \$no_op, # Don't do any operations?
     57    'zaplog'              => \$zaplog, # delete previous logfile
    5558    'redirect-output'     => \$redirect,
    5659    'save-temps'          => \$save_temps, # Save temporary files?
     
    7477my $do_stats;
    7578if ($run_state eq 'new') {
    76     $logDest = prepare_output("LOG.EXP", $outroot, $skycell_id, 0);
     79    $logDest = prepare_output("LOG.EXP", $outroot, $skycell_id, $zaplog);
    7780    $traceDest = prepare_output("TRACE.EXP", $outroot, $skycell_id, 1);
    7881    $do_stats = 1;
  • trunk/tools/runchipimfile.pl

    r29809 r31941  
    1818my ($chip_id, $class_id, $threads, $update, $redirect, $pretend, $save_temps);
    1919
     20my $zaplog;
     21
    2022GetOptions(
    2123    'chip_id=i'         => \$chip_id,
     
    2325    'threads=i'         => \$threads,
    2426    'pretend'           => \$pretend,
     27    'zaplog'            => \$zaplog,
    2528    'redirect-output'   => \$redirect,
    2629    'update'            => \$update,
     
    9598    }
    9699}
    97 print "command to process this skycell\n";
     100print "command to process this chip\n";
    98101print "$command\n";
    99102
    100103exit 0 if $pretend;
     104
     105# XXX: implement this in chip_imfile.pl
     106if ($zaplog) {
     107    my $logfile = $path_base . ".$class_id.log";
     108    my $cmd = "neb-mv $logfile $logfile.trash";
     109    print "$cmd\n";
     110    my $rc = system $cmd;
     111    if ($rc) {
     112        my $status = $rc >> 8;
     113        print STDERR "neb-mv failed with $rc $status\n";
     114        exit $status;
     115    }
     116}
    101117
    102118exit system $command;
  • trunk/tools/rundiffskycell.pl

    r29176 r31941  
    2626my $dbname = "gpc1";
    2727my ($diff_id, $skycell_id, $threads, $update, $redirect);
     28my $zaplog;
    2829
    2930GetOptions(
     
    3233    'threads=i'         => \$threads,
    3334    'redirect-output'   => \$redirect,
     35    'zaplog'            => \$zaplog,
    3436    'update'            => \$update,
    3537    'pretend'           => \$pretend,
     
    7476$command .= " --reduction $reduction" if $reduction;
    7577$command .= " --threads $threads" if $threads;
     78$command .= " --zaplog" if $zaplog;
    7679
    7780print "command to process this skycell\n";
  • trunk/tools/runwarpskycell.pl

    r30857 r31941  
    1717my $dbname = "gpc1";
    1818my ($warp_id, $skycell_id, $threads, $update, $redirect, $pretend, $save_temps);
     19my $zaplog;
    1920
    2021GetOptions(
     
    2324    'threads=i'         => \$threads,
    2425    'pretend'           => \$pretend,
     26    'zaplog'            => \$zaplog,
    2527    'redirect-output'   => \$redirect,
    2628    'update'            => \$update,
     
    103105exit 0 if $pretend;
    104106
     107# XXX: implement this in warp_skycell.pl
     108if ($zaplog) {
     109    my $logfile = $path_base . ".log";
     110    my $cmd = "neb-mv $logfile $logfile.trash";
     111    print "$cmd\n";
     112    my $rc = system $cmd;
     113    if ($rc) {
     114        my $status = $rc >> 8;
     115        print STDERR "neb-mv failed with $rc $status\n";
     116        exit $status;
     117    }
     118}
     119
     120
    105121exit system $command;
    106122
Note: See TracChangeset for help on using the changeset viewer.