Changeset 27859 for trunk/pstamp/scripts/pstamp_job_run.pl
- Timestamp:
- May 4, 2010, 4:10:59 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstamp_job_run.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_job_run.pl
r27751 r27859 74 74 my $ppstamp = can_run('ppstamp') or (warn "Can't find ppstamp" and $missing_tools = 1); 75 75 my $pstamp_get_image_job = can_run('pstamp_get_image_job.pl') or (warn "Can't find pstamp_get_image_job.pl" and $missing_tools = 1); 76 my $dqueryparse = can_run('dqueryparse.pl') or (warn "Can't find dqueryparse.pl" and $missing_tools = 1); 76 77 77 78 if ($missing_tools) { … … 165 166 } 166 167 } elsif ($jobType eq "detect_query") { 167 my_die("detect_query jobs not supported yet", $job_id,$PS_EXIT_CONFIG_ERROR); 168 # detect_query jobs are basically holders to note that we need a file updated before we can continue. 169 # Load the argument list that dqueryparse should have created the first time it ran, so we know how to 170 # run it again the same way. 171 my $argslist = "$outputBase/parse.args"; 172 open ARGSLIST, "<$argslist" or my_die("failed to open argslist file $argslist", $job_id, $PS_EXIT_UNKNOWN_ERROR); 173 my $argString = <ARGSLIST>; 174 close ARGSLIST; 175 chomp $argString; 176 177 # XXX: should we do any other sanity checking? 178 my_die("arglist file $argslist is empty", $job_id, $PS_EXIT_DATA_ERROR) if !$argString; 179 180 my $command = "$dqueryparse --job_id $job_id $argString"; 181 $command .= " --dbname $dbname" if $dbname; 182 $command .= " --dbserver $dbserver" if $dbserver; 183 $command .= " --verbose" if $verbose; 184 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 185 run(command => $command, verbose => $verbose); 186 187 # Although dqueryparse can potentially force more updates (and more jobs), it should still return success. 188 if ($success) { 189 $jobStatus = $PS_EXIT_SUCCESS; 190 } else { 191 $jobStatus = $error_code >> 8; 192 my_die("dqueryparse.pl failed with error code: $jobStatus", $job_id, $jobStatus); 193 } 168 194 } else { 169 195 my_die("unknown jobType $jobType found", $job_id, $PS_EXIT_PROG_ERROR);
Note:
See TracChangeset
for help on using the changeset viewer.
