. // Re-validate jobs. // Use this if you changed your validator to a more permissive policy, // and you want to rerun it on some jobs // (e.g. to grant credit to instances previously marked as invalid) ini_set ("memory_limit", "2G"); require_once("../inc/util_ops.inc"); function show_form() { admin_page_head("Revalidate jobs"); echo " This form lets you re-validate jobs. Use this if you changed your validator to a more permissive policy, and you want to rerun it on some jobs (e.g. to grant credit to instances previously marked as invalid).
"; admin_page_tail(); } function revalidate($clause) { $nwus = 0; $nresults = 0; $wus = BoincWorkunit::enum($clause); foreach($wus as $wu) { $results = BoincResult::enum("workunitid=$wu->id"); $n = 0; foreach ($results as $result) { if ($result->server_state != 5) continue; if ($result->outcome != 1) continue; if ($result->validate_state < 1) continue; $result->update("validate_state=0"); echo "