Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions judge/judgedaemon.main.php
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,14 @@ function fetch_executable_internal(
$lastWorkdir = null;
}
logmsg(LOG_INFO, "No submissions in queue (for endpoint $endpointID), waiting...");
$judgehosts = request('judgehosts', 'GET');
if ($judgehosts !== null) {
$judgehosts = dj_json_decode($judgehosts);
$judgehost = array_filter($judgehosts, fn($j) => $j['hostname'] === $myhost);
if (!isset($judgehost['enabled']) || !$judgehost['enabled']) {
logmsg(LOG_WARNING, "Judgehost needs to be enabled in web interface.");
}
}
}
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/Controller/API/JudgehostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function __construct(
*
* @return Judgehost[]
*/
#[IsGranted('ROLE_JURY')]
#[IsGranted(new Expression("is_granted('ROLE_JURY') or is_granted('ROLE_JUDGEHOST')"))]
#[Rest\Get('')]
#[OA\Response(
response: 200,
Expand Down
Loading