IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 15, 2010, 11:02:40 AM (16 years ago)
Author:
bills
Message:

fail if --update and the component is not faulted. redirect output if update
add pod documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/rundiffskycell.pl

    r29141 r29159  
    4141    if !$diff_id or !$skycell_id;
    4242
     43# if we're asked to update redirect the output
     44$redirect = 1 if $update;
     45
    4346my $ipprc =  PS::IPP::Config->new();
    4447my $dbh = getDBHandle();
    4548
    4649# find warp warp diffs that have a cleaned magicDSRun
    47 my $query1 = "SELECT path_base, diff_skyfile_id,bothways,reduction,diff_mode FROM diffRun JOIN diffSkyfile USING(diff_id)  JOIN diffInputSkyfile USING(diff_id, skycell_id) WHERE diff_id = $diff_id AND skycell_id = '$skycell_id'";
     50my $query1 = "SELECT path_base, diff_skyfile_id,bothways,reduction,diff_mode, diffSkyfile.fault FROM diffRun JOIN diffSkyfile USING(diff_id)  JOIN diffInputSkyfile USING(diff_id, skycell_id) WHERE diff_id = $diff_id AND skycell_id = '$skycell_id'";
    4851
    4952my $stmt1 = $dbh->prepare($query1);
     
    5457my $bothways = $results->{bothways};
    5558my $reduction = $results->{reduction};
     59my $fault = $results->{fault};
     60
     61die "cannot update when skycell is not faulted\n" if $update and !$fault;
    5662
    5763die "path_base not found\n" if !$path_base;
     
    105111}
    106112
     113__END__
     114
     115=pod
     116
     117=head1 NAME
     118
     119rundiffskyfile.pl - gather the parameters for and execute diff_skycell.pl
     120
     121=head1 SYNOPSIS
     122   
     123    perl rundiffskyfile.pl --diff_id <diff_id> --skycell_id <skycell_id> [--threads <num_threads>] [--update] [--redirect-output] [--pretend] [--dbname <dbname>]
     124
     125Query the database for the results of a diff skycell and rerun the processing, optionally reverting a faulted
     126run.
     127
     128=over 4
     129
     130=item * --diff_id <diff_id>
     131
     132The id of the diffSkyfile run to process.
     133
     134=item * --skycell_id <skycell_id>
     135
     136The skycell_id of the diffSkyfile run to process.
     137
     138=item * --threads <num_threads>
     139
     140The number of threads to use. Default 1.
     141Optional.
     142
     143
     144=item * --update
     145
     146Revert a faulted skycell before processing. If the skycell is not faulted no processing is done.
     147WARNING: insure that the standard science procesing either has diff stage turned off or the
     148label of this diffRun ommited from the list of labels otherwise it may attempt to processes this run at the same time.
     149Optional.
     150
     151=item *  --redirect-output
     152
     153Send the output of the command to the logfile. (This is the default if --update is supplied).
     154Optional.
     155
     156=item * --pretend
     157
     158Just print the commands that would be executed, but do not run them.
     159Optional.
     160
     161=item * --dbname <dbname>
     162
     163Name of the IPP databse to query. Default is 'gpc1'.
     164Optional.
     165
     166
     167=head1 SEE ALSO
     168L<runchipimfile.pl>, L<runcameraexp.pl>, L<rundiffskyfile.pl>
     169
     170=cut
Note: See TracChangeset for help on using the changeset viewer.