Skip to content

Commit 9362b92

Browse files
author
Michael Vasseur
committed
Cleanup the judgehost file
1 parent 1edc428 commit 9362b92

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

judge/judgedaemon.main.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -751,12 +751,10 @@ function fetch_executable_internal(
751751
// Request open submissions to judge. Any errors will be treated as
752752
// non-fatal: we will just keep on retrying in this loop.
753753
$judging = request('judgehosts/fetch-work', 'POST', ['hostname' => $myhost], false);
754-
var_dump($judging);
755754
// If $judging is null, an error occurred; don't try to decode.
756755
if (!is_null($judging)) {
757756
$row = dj_json_decode($judging);
758757
}
759-
var_dump("Working judging.");
760758

761759
// nothing returned -> no open submissions for us
762760
if (empty($row)) {
@@ -778,7 +776,6 @@ function fetch_executable_internal(
778776
}
779777
continue;
780778
}
781-
var_dump("Non empty.");
782779

783780
// We have gotten a work packet.
784781
$endpoints[$endpointID]["waiting"] = false;
@@ -787,9 +784,7 @@ function fetch_executable_internal(
787784
logmsg(LOG_INFO,
788785
"⇝ Received " . sizeof($row) . " '" . $type . "' judge tasks (endpoint $endpointID)");
789786

790-
var_dump($row);
791787
$jobId = $row[0]['jobid'];
792-
var_dump($jobId);
793788

794789
if ($type == 'prefetch') {
795790
if ($lastWorkdir !== null) {
@@ -820,11 +815,9 @@ function fetch_executable_internal(
820815
logmsg(LOG_INFO, " 🔥 Pre-heating judgehost completed.");
821816
continue;
822817
}
823-
var_dump("Get here...");
824818

825819
// Create workdir for judging.
826820
$workdir = judging_directory($workdirpath, $row[0]);
827-
var_dump($workdir);
828821
logmsg(LOG_INFO, " Working directory: $workdir");
829822

830823
if ($type == 'debug_info') {
@@ -879,8 +872,6 @@ function fetch_executable_internal(
879872
continue;
880873
}
881874

882-
var_dump($row);
883-
var_dump("Working on output_visual");
884875
if ($type == 'output_visualization') {
885876
if ($lastWorkdir !== null) {
886877
cleanup_judging($lastWorkdir);
@@ -903,14 +894,10 @@ function fetch_executable_internal(
903894
}
904895

905896
$teamoutput = $workdir . "/testcase" . sprintf('%05d', $judgeTask['testcase_id']) . '/1/program.out';
906-
//$feedbackoutput = $wVorkdir . "/testcase" . sprintf('%05d', $judgeTask['testcase_id']) . '/1/feedback/visual.png';
907-
var_dump("Working in", $teamoutput);
908897
$visual_cmd = implode(' ', array_map('dj_escapeshellarg',
909898
[$runpath, $teamoutput, $tmpfile]));
910-
var_dump($visual_cmd);
911899
system($visual_cmd, $retval);
912900
// FIXME: check retval
913-
var_dump("testcase", $judgeTask['testcase_id']);
914901

915902
request(
916903
sprintf('judgehosts/add-visual/%s/%s', urlencode($myhost),
@@ -920,8 +907,6 @@ function fetch_executable_internal(
920907
'testcase_id' => $judgeTask['testcase_id']],
921908
false
922909
);
923-
$b = rest_encode_file($tmpfile, false);
924-
var_dump($b);
925910
unlink($tmpfile);
926911

927912
logmsg(LOG_INFO, " ⇡ Uploading visual output of workdir $workdir.");

0 commit comments

Comments
 (0)