diff options
| author | Cassio de Campos <cassiopc@gmail.com> | 2017-08-29 11:27:40 +0000 |
|---|---|---|
| committer | Cassio de Campos <cassiopc@gmail.com> | 2017-08-29 11:27:40 +0000 |
| commit | a8f4723c268d3bf0d42bd4a3a79d0d5d5dfd465d (patch) | |
| tree | ce07faec23d807b21b9d5e309b35d455f1b7c256 /src/frun.php | |
| parent | 7191e76649dbb207db26b59271cb6e16cc427bc6 (diff) | |
| download | boca-a8f4723c268d3bf0d42bd4a3a79d0d5d5dfd465d.tar.gz boca-a8f4723c268d3bf0d42bd4a3a79d0d5d5dfd465d.zip | |
bug fixes and speed up runs
Diffstat (limited to 'src/frun.php')
| -rw-r--r-- | src/frun.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/frun.php b/src/frun.php index eb5d33f..77677ad 100644 --- a/src/frun.php +++ b/src/frun.php @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. //////////////////////////////////////////////////////////////////////////////// -// Last modified 26/jul/2017 by cassio@ime.usp.br +// Last modified 29/aug/2017 by cassio@ime.usp.br function DBDropRunTable() { $c = DBConnect(); @@ -498,7 +498,7 @@ function DBUpdateRunAutojudging($contest, $site, $number, $ip, $answer, $stdout, LOGLevel("Autojudging automatically answered a run (run=$number, site=$site, contest=$contest, retval=$retval, answer='$answer')", 3); return true; } -function DBGiveUpRunAutojudging($contest, $site, $number, $ip="", $ans="") { +function DBGiveUpRunAutojudging($contest, $site, $number, $ip="", $ans="", $fromadmin=false) { $c = DBConnect(); DBExec($c, "begin work", "DBGiveUpRunAutojudging(transaction)"); $sql = "select * from runtable as r " . @@ -514,14 +514,13 @@ function DBGiveUpRunAutojudging($contest, $site, $number, $ip="", $ans="") { $t = time(); $b = DBSiteInfo($contest, $site, $c); - if($b["siteautojudge"]=="t") { + if($fromadmin && $b["siteautojudge"]=="t") { if(DBUpdateRunO($contest, $site, $a["usernumber"], $site, $number, 7, $c)==false) { // 7 means contact staff DBExec($c, "rollback work", "DBGiveUpRunAutojudging(rollback auto)"); LOGError("Unable to automatically update a run answer (run=$number, site=$site, ". "contest=$contest, answer='$ans', retval=7)"); return false; } - LOGLevel("Autojudging automatically answered a run (run=$number, site=$site, contest=$contest, retval=7, answer='$ans')", 3); } if($ip=="") { |