mirror of https://github.com/BOINC/boinc.git
- remote job submission: bug fixes, and avoid divide by zero
in adjust_user_priority. From Niclas Lockner.
This commit is contained in:
parent
0a75353fb7
commit
48e1de5348
|
@ -160,7 +160,6 @@ function xml_get_jobs($r) {
|
|||
}
|
||||
|
||||
function submit_batch($r) {
|
||||
print_r($r);
|
||||
$app = get_app($r);
|
||||
list($user, $user_submit) = authenticate_user($r, $app);
|
||||
$template = read_input_template($app);
|
||||
|
@ -201,7 +200,7 @@ function submit_batch($r) {
|
|||
}
|
||||
}
|
||||
$cmd = "cd ../../bin; ./adjust_user_priority --user $user->id --flops $total_flops --app $app->name";
|
||||
$x = system($cmd);
|
||||
$x = exec($cmd);
|
||||
if (!is_numeric($x) || (double)$x == 0) {
|
||||
xml_error(-1, "$cmd returned $x");
|
||||
}
|
||||
|
|
|
@ -622,6 +622,9 @@ double user_priority_delta(
|
|||
double total_quota,
|
||||
double project_flops
|
||||
) {
|
||||
if (total_quota == 0) return 0;
|
||||
if (project_flops == 0) return 0;
|
||||
|
||||
double runtime = flop_count / project_flops;
|
||||
double share = us.quota / total_quota;
|
||||
#if 0
|
||||
|
|
Loading…
Reference in New Issue