Changeset 33141 for trunk/pstamp/scripts/dqueryparse.pl
- Timestamp:
- Jan 24, 2012, 4:40:12 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/dqueryparse.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/dqueryparse.pl
r33126 r33141 118 118 { 119 119 my $command = "$detectresponse --input $req_file --output $response_file --workdir $outdir"; 120 if ($job_id) { 121 $command .= " --job_id $job_id"; 122 } else { 123 $command .= " --ignore-wisdom"; 124 } 120 125 $command .= " --save-temps" if $save_temps; 121 126 $command .= " --verbose" if $verbose; 122 $command .= " --ignore-wisdom" if !$job_id;123 127 124 128 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 133 137 my_die ("Update request indicated, but unable to find actual request!", $PS_EXIT_PROG_ERROR); 134 138 } 139 warn("Some inputs are not available must be updated."; 135 140 } 136 141 … … 139 144 my $result; 140 145 unless ($job_id) { 146 # We are running as a parse job 141 147 # If we returned correctly with a valid response file, get a job ID 142 148 # for the completed work, and move the response to a standardized name. … … 152 158 chomp $job_id; 153 159 if ($job_id && -e $response_file) { 154 rename $response_file, "$outdir/response ${job_id}.fits";160 rename $response_file, "$outdir/response.${job_id}.fits"; 155 161 } 156 162 $result = 0; … … 222 228 my_die ("Parse fault!!", $fault); 223 229 } 230 # This does not set the request state to stop. That will happen with the request_finish.pl script, 231 # which will notice that we've inserted the stopped job and decide we're finished. Easy enough. 232 { 233 my $command = "$pstamptool -updatereq -req_id $req_id -set_name $req_name -set_outProduct $product"; 234 $command .= " -set_fault $result" if $result; 235 236 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 237 run(command => $command, verbose => $verbose); 238 unless ($success) { 239 my_die("$command failed",$PS_EXIT_UNKNOWN_ERROR); 240 } 241 } 224 242 } else { 243 # We are running as a job presumably because an input needed 244 # to be regenerated 245 if ($fault) { 225 246 # in some cases we will need to finish off the request 226 247 my_die ("Run fault!!", $fault); 227 } 228 229 # This does not set the request state to stop. That will happen with the request_finish.pl script, 230 # which will notice that we've inserted the stopped job and decide we're finished. Easy enough. 231 { 232 my $command = "$pstamptool -updatereq -req_id $req_id -set_name $req_name -set_outProduct $product"; 233 $command .= " -set_fault $result" if $result; 234 235 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 236 run(command => $command, verbose => $verbose); 237 unless ($success) { 238 my_die("$command failed",$PS_EXIT_UNKNOWN_ERROR); 239 } 240 } 248 } 249 if (-e $response_file) { 250 rename $response_file, "$outdir/response.${job_id}.fits"; 251 } 252 } 253 241 254 242 255 exit 0;
Note:
See TracChangeset
for help on using the changeset viewer.
