IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 26, 2010, 2:50:10 PM (16 years ago)
Author:
Paul Price
Message:

Only do deletions for a single host, which allows parallelisation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/delete_convolved_diff.pl

    r27044 r27106  
    1212use constant EXT => [ 'inConv.fits', 'inConv.mk.fits', 'inConv.wt.fits',
    1313                      'refConv.fits', 'refConv.mk.fits', 'refConv.wt.fits' ]; # Extensions to delete
     14
     15my $hostname = `hostname`;      # Name of host
     16chomp $hostname;
     17
    1418
    1519my ($db_host, $db_name, $db_user, $db_pw); # Database details
     
    4246my @files;                      # Files to clean up
    4347{
    44     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')";
     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'";
    4549    my $results = $db->selectall_arrayref( $sql ) or die "Unable to execute SQL: $DBI::errstr";
    4650    foreach my $result ( @$results ) {
     
    5256            print "$file\n";
    5357            eval { $neb->delete($file); };
     58#            $file = eval { $neb->find($file); };
     59#            print "--> $file\n";
    5460        }
    5561    }
Note: See TracChangeset for help on using the changeset viewer.