From e92c9001bad9bc7bffa4c73c6b58b3f8366d5f08 Mon Sep 17 00:00:00 2001 From: konpoku <543329382@qq.com> Date: Tue, 19 May 2026 22:52:08 +0800 Subject: [PATCH 1/5] start thuai9 --- src/configs/contest.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/configs/contest.ts b/src/configs/contest.ts index 1778acfa..3d877460 100644 --- a/src/configs/contest.ts +++ b/src/configs/contest.ts @@ -68,4 +68,13 @@ export const contest_image_map: ContestImages = { COMPILER_TIMEOUT: "10m", RUNNER_TOKEN_TIMEOUT: "30m", }, + THUAI9: { + SERVER_IMAGE: "eesast/thuai9_run_server", + CLIENT_IMAGE: "eesast/thuai9_run_client", + COMPILER_IMAGE: "eesast/thuai9_cpp", + ENVOY_IMAGE: + "envoyproxy/envoy:dev-55a95a171c1371b2402e9c8e2092f5b0ca02462d", + COMPILER_TIMEOUT: "10m", + RUNNER_TOKEN_TIMEOUT: "30m", + } }; From a92153ecd7bb000257188aa52d2c4ef089c9ee1e Mon Sep 17 00:00:00 2001 From: konpoku <543329382@qq.com> Date: Wed, 20 May 2026 14:39:01 +0800 Subject: [PATCH 2/5] fix cpp compile output path --- src/routes/code.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/code.ts b/src/routes/code.ts index 89958d11..4d7e92df 100644 --- a/src/routes/code.ts +++ b/src/routes/code.ts @@ -329,7 +329,7 @@ router.post("/compile-finish", async (req, res) => { if (compile_status === "Completed") { const key = `${cosPath}/${code_id}`; - const localFilePath = `${base_directory}/${contest_name}/code/${team_id}/${code_id}/output/${code_id}`; + const localFilePath = `${base_directory}/${contest_name}/code/${team_id}/${code_id}/output/capi`; const found = await waitForFile(localFilePath); if (!found) { throw new Error(`File not found: ${localFilePath}`); From 018992641dfb48b7e1c0ff68989f7a1a5a11fc85 Mon Sep 17 00:00:00 2001 From: konpoku <543329382@qq.com> Date: Thu, 21 May 2026 22:38:06 +0800 Subject: [PATCH 3/5] enable docker cron --- src/index.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index f424a7db..efe09125 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,7 +4,7 @@ import http from "http"; import app from "./app"; import { GraphQLClient } from "graphql-request"; import { queue_element } from "./helpers/docker_queue"; -// import docker_cron from "./helpers/docker_queue"; +import docker_cron from "./helpers/docker_queue"; const debug = Debug("eesast-api"); @@ -27,10 +27,8 @@ export const client = new GraphQLClient( ); export const docker_queue: queue_element[] = []; -// export const docker_queue: queue_element[] = JSON.parse( -// fs.readFileSync("/data/queue_data.json").toString() -// ); -// docker_cron(); + +docker_cron(); // weekly_cron(); // weekly_init(); From bd03e6e9bd1b1e27908f3da6949dbbf7f35762e7 Mon Sep 17 00:00:00 2001 From: konpoku <543329382@qq.com> Date: Thu, 21 May 2026 23:19:25 +0800 Subject: [PATCH 4/5] disable envoy --- src/routes/arena.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/arena.ts b/src/routes/arena.ts index 3cd5c8c8..93708d16 100644 --- a/src/routes/arena.ts +++ b/src/routes/arena.ts @@ -16,7 +16,7 @@ const router = express.Router(); * @param {uuid} map_id * @param {TeamLabelBind[]} team_labels * @param {number} exposed (0 or 1, default 1) - * @param {number} envoy (0 or 1, default 1) + * @param {number} envoy (0 or 1, default 0) */ router.post("/create", authenticate(), async (req, res) => { try { @@ -25,7 +25,7 @@ router.post("/create", authenticate(), async (req, res) => { const map_id = req.body.map_id; const team_label_binds: ContConf.TeamLabelBind[] = req.body.team_labels; const exposed = req.body.exposed ?? 1; - const envoy = req.body.envoy ?? 1; + const envoy = req.body.envoy ?? 0; console.debug("user_uuid: ", user_uuid); console.debug("contest_name: ", contest_name); console.debug("map_id: ", map_id); From 391b262ba1514f285bb76e106b39248395d994cf Mon Sep 17 00:00:00 2001 From: konpoku <543329382@qq.com> Date: Fri, 22 May 2026 15:02:46 +0800 Subject: [PATCH 5/5] fixed file name --- src/routes/code.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/code.ts b/src/routes/code.ts index 4d7e92df..89958d11 100644 --- a/src/routes/code.ts +++ b/src/routes/code.ts @@ -329,7 +329,7 @@ router.post("/compile-finish", async (req, res) => { if (compile_status === "Completed") { const key = `${cosPath}/${code_id}`; - const localFilePath = `${base_directory}/${contest_name}/code/${team_id}/${code_id}/output/capi`; + const localFilePath = `${base_directory}/${contest_name}/code/${team_id}/${code_id}/output/${code_id}`; const found = await waitForFile(localFilePath); if (!found) { throw new Error(`File not found: ${localFilePath}`);