- Timestamp:
- Jul 30, 2010, 9:31:50 AM (16 years ago)
- Location:
- branches/eam_branches/ipp-20100621/pstamp
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
scripts/dqueryparse.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100621/pstamp
- Property svn:ignore
-
old new 16 16 ltmain.sh 17 17 libtool 18 ppstamp.pc
-
- Property svn:ignore
-
branches/eam_branches/ipp-20100621/pstamp/scripts/dqueryparse.pl
r27874 r28794 102 102 if $extname ne "MOPS_DETECTABILITY_QUERY"; 103 103 my_die("$req_file is version $extver expecting 1", $PS_EXIT_PROG_ERROR) 104 if $extver ne 1;104 if ($extver ne 1) and ($extver ne 2); 105 105 106 106 # Set up the workdir for this query. … … 129 129 $fault = $error_code >> 8; 130 130 if ($fault == $PSTAMP_NOT_AVAILABLE) { 131 $data_to_update = (split /\n/, (join "", @$stdout_buf))[-1]; 131 unless (-e "$outdir/update_request.dat") { 132 my_die ("Update request indicated, but unable to find actual request!", $PS_EXIT_PROG_ERROR); 133 } 132 134 } 135 133 136 } 134 137 … … 158 161 # Failed to run correctly, which means that we need to queue a job and flag data for updating. 159 162 # Get the dependency id for the data we're requesting be updated. 160 my $dep_id = queue_update_run($req_id,$job_id,$outdir,$label,$data_to_update); 161 162 # Link this request to a job and link that job to any dependency 163 my $command = "$pstamptool -addjob -req_id $req_id -outputBase $outdir"; 164 $command .= " -job_type detect_query -state run -fault 0"; 165 $command .= " -rownum 1"; 166 $command .= " -dep_id $dep_id" if $dep_id; 167 168 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 169 run(command => $command, verbose => $verbose); 170 171 if ($success) { 172 $job_id = join "", @$stdout_buf; 173 chomp $job_id; 174 if ($job_id && -e $response_file) { 175 # We shouldn't have a response file at this stage. 176 rename $response_file, "$outdir/response${job_id}.fits"; 177 } 178 $result = 0; 179 } else { 180 warn("Unable to perform $command error code: $error_code"); 181 $result = $error_code >> 8; 182 } 163 open(UPDATE_REQUEST,"$outdir/update_request.dat") || my_die ("Update request indicated, but unable to find actual request!", $PS_EXIT_PROG_ERROR); 164 while (<UPDATE_REQUEST>) { 165 my $data_to_update = $_; 166 chomp($data_to_update); 167 my $dep_id = queue_update_run($req_id,$job_id,$outdir,$label,$data_to_update); 168 169 # Link this request to a job and link that job to any dependency 170 my $command = "$pstamptool -addjob -req_id $req_id -outputBase $outdir"; 171 $command .= " -job_type detect_query -state run -fault 0"; 172 $command .= " -rownum 1"; 173 $command .= " -dep_id $dep_id" if $dep_id; 174 175 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 176 run(command => $command, verbose => $verbose); 177 178 if ($success) { 179 $job_id = join "", @$stdout_buf; 180 chomp $job_id; 181 if ($job_id && -e $response_file) { 182 # We shouldn't have a response file at this stage. 183 rename $response_file, "$outdir/response${job_id}.fits"; 184 } 185 $result = 0; 186 } else { 187 warn("Unable to perform $command error code: $error_code"); 188 $result = $error_code >> 8; 189 } 190 } 191 close(UPDATE_REQUEST); 183 192 } 184 193
Note:
See TracChangeset
for help on using the changeset viewer.
