IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 10, 2010, 3:51:49 PM (16 years ago)
Author:
Paul Price
Message:

Forgot that there were two magic runs queued per diff run for
warp-warp diffs with the 'bothways' flag. As a result, images were
being deleted that were still required (because one magic run was
done, allowing the images to be deleted, while another was in progress
and needed the images still). Fixed the query to prevent this from
happening.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/delete_convolved_diff.pl

    r27106 r27241  
    4646my @files;                      # Files to clean up
    4747{
    48     my $sql = "SELECT path_base FROM diffSkyfile JOIN diffRun USING(diff_id) JOIN magicRun USING(diff_id) WHERE diffRun.state IN ('full', 'drop') AND magicRun.state IN ('full', 'drop', 'censored') AND diffSkyfile.hostname = '$hostname'";
     48
     49    my $sql = <<SQL_DONE;
     50SELECT path_base
     51FROM diffRun
     52JOIN diffSkyfile USING(diff_id)
     53JOIN magicRun USING(diff_id)
     54WHERE diffRun.state IN ('full', 'drop')
     55    AND magicRun.state IN ('full', 'drop', 'censored')
     56    AND diffRun.bothways = 0
     57    AND diffSkyfile.hostname = '$hostname'
     58UNION
     59SELECT path_base
     60FROM diffRun
     61JOIN diffSkyfile USING(diff_id)
     62JOIN magicRun AS magicPositive
     63    ON magicPositive.diff_id = diffRun.diff_id
     64    AND magicPositive.inverse = 0
     65JOIN magicRun AS magicNegative
     66    ON magicNegative.diff_id = diffRun.diff_id
     67    AND magicNegative.inverse = 1
     68WHERE diffRun.state IN ('full', 'drop')
     69    AND magicPositive.state IN ('full', 'drop', 'censored')
     70    AND magicNegative.state IN ('full', 'drop', 'censored')
     71    AND diffRun.bothways = 1
     72    AND diffSkyfile.hostname = '$hostname'
     73SQL_DONE
     74
    4975    my $results = $db->selectall_arrayref( $sql ) or die "Unable to execute SQL: $DBI::errstr";
    5076    foreach my $result ( @$results ) {
Note: See TracChangeset for help on using the changeset viewer.