IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 31, 2009, 3:34:44 PM (17 years ago)
Author:
bills
Message:

To prevent the top level working directory from becoming unreasonably large
create the request's working directories in a subdirectory with the name of the current date.

File:
1 edited

Legend:

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

    r24831 r24961  
    1313use Getopt::Long qw( GetOptions );
    1414use File::Basename qw( basename dirname);
     15use POSIX qw( strftime );
    1516
    1617my $req_id;
     
    7475}
    7576
    76 # workdir is where we download request files to and place any error output from the parser
     77# workdir is where all of the files generated for this request are placed
    7778# NOTE: this location needs to be kept in sync with the web interface ( request.php )
    78 my $workdir = "$pstamp_workdir/$req_id";
    79 
     79my $datestr = strftime "%Y%m%d", gmtime;
     80my $datedir = "$pstamp_workdir/$datestr";
     81if (! -e $datedir ) {
     82    mkdir $datedir or die "failed to create working directory $datedir for request id $req_id";
     83}
     84
     85my $workdir = "$datedir/$req_id";
    8086if (! -e $workdir ) {
    8187    mkdir $workdir or die "failed to create working directory $workdir for request id $req_id";
Note: See TracChangeset for help on using the changeset viewer.