mirror of https://github.com/BOINC/boinc.git
remote job submission: improve error reporting
This commit is contained in:
parent
1e6e22449d
commit
39edd6d3f8
|
@ -181,10 +181,13 @@ function submit_jobs($jobs, $template, $app, $batch_id, $priority) {
|
|||
|
||||
$cmd = "cd ../..; ./bin/create_work --appname $app->name --batch $batch_id --rsc_fpops_est $job->rsc_fpops_est --priority $priority --stdin";
|
||||
$h = popen($cmd, "w");
|
||||
if ($h === false) {
|
||||
xml_error(-1, "BOINC server: can't run create_work");
|
||||
}
|
||||
fwrite($h, $x);
|
||||
$ret = pclose($h);
|
||||
if ($ret < 0) {
|
||||
xml_error(-1, "BOINC server: can't create job");
|
||||
xml_error(-1, "BOINC server: create_work failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -331,7 +331,7 @@ int main(int argc, char** argv) {
|
|||
if (!strlen(jd2.wu.name)) {
|
||||
sprintf(jd2.wu.name, "%s_%d", jd.wu.name, j);
|
||||
}
|
||||
create_work(
|
||||
retval = create_work(
|
||||
jd2.wu,
|
||||
jd2.wu_template,
|
||||
jd2.result_template_file,
|
||||
|
@ -343,6 +343,10 @@ int main(int argc, char** argv) {
|
|||
jd2.additional_xml,
|
||||
value_buf
|
||||
);
|
||||
if (retval) {
|
||||
fprintf(stderr, "create_work() failed: %d\n", retval);
|
||||
exit(1);
|
||||
}
|
||||
if (values.size()) {
|
||||
values += ",";
|
||||
values += value_buf;
|
||||
|
|
Loading…
Reference in New Issue