Changeset 28003 for branches/pap/pstamp/scripts/dquery_finish.pl
- Timestamp:
- May 18, 2010, 12:49:05 PM (16 years ago)
- Location:
- branches/pap
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
pstamp/scripts/dquery_finish.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap
- Property svn:mergeinfo changed
-
branches/pap/pstamp/scripts/dquery_finish.pl
r27578 r28003 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 foreach my $job (@jobs) { 122 123 my $job_id = $job->{job_id}; 123 124 my $response_file = "response${job_id}.fits"; 124 my $response_path = "$out _dir/$response_file";125 my $response_path = "$outdir/$response_file"; 125 126 126 127 if (-e $response_path) { 127 128 # the job generated a response file put it into the Data Store 128 129 print $REGLIST "$response_file|||table|\n"; 130 131 # do the same if we have an error file. Should the parse data be uploaded as well? 132 my $err_file = "parse_error.txt"; 133 if (-e "$outdir/$err_file") { 134 print $REGLIST "$err_file|||text|\n"; 135 } 129 136 } else { 130 137 print STDERR "detect_query response file for job $job_id not found\n" if $verbose; … … 136 143 if (-s $reg_list) { 137 144 my $command = "$dsreg --add $req_name --product $product --list $reg_list"; 138 $command .= " --copy --datapath $out _dir";145 $command .= " --copy --datapath $outdir"; 139 146 $command .= " --type MOPS_DETECTABILITY_RESPONSE"; 147 $command .= " --ps0 $req_id"; 140 148 $command .= " --dbname $dbname" if $dbname; 141 149 … … 158 166 my $verbose = shift; 159 167 160 my $command = "$pstamptool -updatereq -req_id $req_id -s tate stop";161 $command .= " - fault $fault" if $fault;168 my $command = "$pstamptool -updatereq -req_id $req_id -set_state stop"; 169 $command .= " -set_fault $fault" if $fault; 162 170 $command .= " -dbname $dbname" if $dbname; 163 171 $command .= " -dbserver $dbserver" if $dbserver;
Note:
See TracChangeset
for help on using the changeset viewer.
