IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 115


Ignore:
Timestamp:
Oct 8, 2003, 12:04:57 AM (23 years ago)
Author:
eugene
Message:

improved the 'cleanup' function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/perl/src/mkdetrend

    r56 r115  
    106106        }
    107107    }
    108     $file = mkfiles ("split");
    109     symlink ("/data/koa/split", $file);
    110108    &save_dates ($start, $stop, "init");
    111109
     
    148146        }
    149147    }
    150     $file = mkfiles ("split");
    151     symlink ("/data/koa/split", $file);
    152148    &save_dates ($start, $stop, "init");
    153149
     
    336332    # only deletes temporary files for configs in state 'done'
    337333   
    338     @delete = ('fits', 'norm', 'proc.imbin', 'proc.medbin', 'proc.tenbin');
    339     @list = load_config ();
    340    
    341     $split = mkfiles ("split");
    342     @answer = `df -k $split`;
    343     @words = split (" ", $answer[1]);
    344     print STDERR "space free at start: $words[3]\n";
     334    @list = load_config ();
     335   
    345336    $detdir = mkfiles ("detdir");
    346337    open (CF, ">$detdir/clean.fail");
     
    373364                $Ngood ++;
    374365            }
    375 
    376             # delete files names in these files (not needed with flips2)
    377             $name = &mknames ("msplit", $confline, $ccd);
    378             open (FILE, "$name");
    379             @dlist = <FILE>;
    380             close (FILE);
    381 
    382             # delete file, if it exists
    383             foreach $file (@dlist) {
    384                 chop $file;
    385                 if (! -e $file) { $Nmiss ++; next; }
    386                 if (!unlink $file) { $Nfail ++; print CF "$file\n"; next; }
    387                 $Ngood ++;
    388             }
    389 
    390366        }
    391367        $confline = stconfig ($confline, "status", "clean");
     
    394370    close (CF);
    395371   
    396     $split = mkfiles ("split");
    397     @answer = `df -k $split`;
    398     @words = split (" ", $answer[1]);
    399     print STDERR "space free at end: $words[3]\n";
    400372    print STDERR "$Ngood files deleted\n";
    401373    print STDERR "$Nmiss files already removed\n";
     
    463435            }
    464436            if (($status eq "freeze") || ($status eq "accepted")) {
    465                 $confline = stconfig ($confline, "status", "freeze");
    466437                next RESET;
    467438            }
Note: See TracChangeset for help on using the changeset viewer.