Пример #1
0
    $error = GET_string('error');
    $run->finish($status, $error);
    die;
}
if (GET_string("run") == 'addEngine') {
    $run = new Run(GET_int('runid'));
    $revision = GET_string('cset');
    $mode = Mode::FromMode(GET_string('name'));
    if ($run->isFinished() || $run->hasError()) {
        throw new Exception("Run was already finished or error'ed");
    }
    if ($run->isOutOfOrder()) {
        // out of order builds cannot add extra modes. The available
        // mode have already been added.
        if (!Build::withRunAndMode($run->id, $mode->id)) {
            $run->finish(0, "Tried to add extra modes to out of order run.");
        }
        die;
    }
    Build::insert($run, $mode->id, $revision);
    die;
}
// Report that a slave is still awake when there are no benchmarks results
// to send.
if (GET_string('awake') == 'yes') {
    $MACHINE = GET_int('MACHINE');
    mysql_query("UPDATE awfy_machine\n                 SET last_checked = UNIX_TIMESTAMP()\n                 WHERE id = {$MACHINE}") or die("ERROR: " . mysql_error());
    die;
}
// Report score of a benchmark total or subtest.
$run_id = GET_int('run');