IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 23, 2011, 1:46:37 PM (15 years ago)
Author:
bills
Message:

For get_image jobs store bundles in nebulous. Keep track of the files in new table pstampFile.
Delete them when cleaning up the request.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstamp_cleanup.pl

    r27874 r32785  
    2323
    2424use PS::IPP::Config qw( :standard );
     25use PS::IPP::PStamp::Job qw( :standard );
    2526
    2627my $req_id;
     
    9596}
    9697
     98{
     99    my $command = "$pstamptool -listfile -req_id $req_id";
     100    $command   .= " -dbname $dbname" if $dbname;
     101    $command   .= " -dbserver $dbserver" if $dbserver;
     102    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     103        run(command => $command, verbose => $verbose);
     104    unless ($success) {
     105        die("Unable to perform $command error code: $error_code");
     106    }
     107    my $output = join "", @$stdout_buf;
     108    if ($output) {
     109        my $files = parse_md_fast($mdcParser, $output);
     110        foreach my $file (@$files) {
     111            $ipprc->file_delete($file->{path});
     112        }
     113    }
     114}
     115
    97116# now go find the workdir for this request
    98117# XXX: we finally *have* to store this in the database
Note: See TracChangeset for help on using the changeset viewer.