Example #1
0
$user = new User();
$host = new Host($user);
$app = new App("upper_case");
$app_version = new App_Version($app);
$work = new Work($app);
$work->wu_template = "uc_wu";
$work->result_template = "uc_result";
$work->redundancy = 5;
$work->delay_bound = 70;
array_push($work->input_files, "input");
$project->add_user($user);
$project->add_app($app);
$project->add_app_version($app_version);
$project->install();
// must install projects before adding to hosts
$project->install_make_work($work, 499, 5);
$host->log_flags = "log_flags.xml";
$host->add_user($user, $project);
$host->install();
$work->install($project);
$project->start_servers();
// Start by generating a batch of 500 results
$n = 0;
while ($n < 500) {
    $n = $project->num_wus_left();
    verbose_echo(1, "Generating results [{$n}/500]");
    sleep(1);
}
verbose_echo(1, "Generating results... 500 done");
// Stop the project, deinstall make_work, and install the normal backend components
$project->stop();