Changeset 27874 for trunk/pstamp/scripts/dquery_finish.pl
- Timestamp:
- May 6, 2010, 1:55:20 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/dquery_finish.pl (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/dquery_finish.pl
r27859 r27874 20 20 use PS::IPP::Config qw( :standard ); 21 21 22 my ( $req_id, $req_name, $req_file, $product, $out _dir, $dbname, $dbserver, $verbose, $save_temps );22 my ( $req_id, $req_name, $req_file, $product, $outdir, $dbname, $dbserver, $verbose, $save_temps ); 23 23 24 24 GetOptions( … … 27 27 'req_file=s' => \$req_file, 28 28 'product=s' => \$product, 29 'out _dir=s' => \$out_dir,29 'outdir=s' => \$outdir, 30 30 'dbname=s' => \$dbname, 31 31 'dbserver=s' => \$dbserver, … … 41 41 $err .= "--req_name is required\n" if !$req_name; 42 42 $err .= "--product is required\n" if !$product; 43 $err .= "--out _dir is required\n" if !$out_dir;43 $err .= "--outdir is required\n" if !$outdir; 44 44 45 45 die "$err" if $err; … … 76 76 die "product directory does not exist $prod_dir"; 77 77 } 78 my $out _dir = "$prod_dir/$req_name";78 my $outdir = "$prod_dir/$req_name"; 79 79 } 80 if (! -e $out _dir ) {80 if (! -e $outdir ) { 81 81 # something must have gone wrong at the parse stage 82 print STDERR "output fileset directory $out _dir does not exist\n" if $verbose;83 if (! mkdir $out _dir ) {82 print STDERR "output fileset directory $outdir does not exist\n" if $verbose; 83 if (! mkdir $outdir ) { 84 84 stop_request($req_id, $PS_EXIT_SYS_ERROR, $verbose); 85 die "cannot create output directory $out _dir";85 die "cannot create output directory $outdir"; 86 86 } 87 } elsif (! -d $out _dir) {87 } elsif (! -d $outdir) { 88 88 stop_request($req_id, $PS_EXIT_SYS_ERROR, $verbose); 89 die "output fileset directory $out _dir exists but is not a directory";89 die "output fileset directory $outdir exists but is not a directory"; 90 90 } 91 91 … … 118 118 119 119 # XXX: have the jobs produce the reglist as with postage stamp requests 120 my ($REGLIST, $reg_list) = tempfile("$out _dir/reqlist.XXXX", UNLINK => !$save_temps);120 my ($REGLIST, $reg_list) = tempfile("$outdir/reqlist.XXXX", UNLINK => !$save_temps); 121 121 122 122 foreach my $job (@jobs) { 123 123 my $job_id = $job->{job_id}; 124 124 my $response_file = "response${job_id}.fits"; 125 my $response_path = "$out _dir/$response_file";125 my $response_path = "$outdir/$response_file"; 126 126 127 127 if (-e $response_path) { … … 131 131 # do the same if we have an error file. Should the parse data be uploaded as well? 132 132 my $err_file = "parse_error.txt"; 133 if (-e "$out _dir/$err_file") {133 if (-e "$outdir/$err_file") { 134 134 print $REGLIST "$err_file|||text|\n"; 135 135 } … … 143 143 if (-s $reg_list) { 144 144 my $command = "$dsreg --add $req_name --product $product --list $reg_list"; 145 $command .= " --copy --datapath $out _dir";145 $command .= " --copy --datapath $outdir"; 146 146 $command .= " --type MOPS_DETECTABILITY_RESPONSE"; 147 147 $command .= " --ps0 $req_id"; … … 166 166 my $verbose = shift; 167 167 168 my $command = "$pstamptool -updatereq -req_id $req_id -s tate stop";169 $command .= " - fault $fault" if $fault;168 my $command = "$pstamptool -updatereq -req_id $req_id -set_state stop"; 169 $command .= " -set_fault $fault" if $fault; 170 170 $command .= " -dbname $dbname" if $dbname; 171 171 $command .= " -dbserver $dbserver" if $dbserver;
Note:
See TracChangeset
for help on using the changeset viewer.
