fix: write interaction into cache

This commit is contained in:
Barrett Ruth 2025-10-05 13:50:14 -04:00
parent fd550bc654
commit cedcd82367
2 changed files with 8 additions and 6 deletions

View file

@ -160,9 +160,9 @@ end
---@param contest_id string
---@param problem_id string
---@param test_cases TestCase[]
---@param timeout_ms? number
---@param memory_mb? number
---@param interactive? boolean
---@param timeout_ms number
---@param memory_mb number
---@param interactive boolean
function M.set_test_cases(
platform,
contest_id,
@ -185,8 +185,9 @@ function M.set_test_cases(
local index = cache_data[platform][contest_id].index_map[problem_id]
cache_data[platform][contest_id].problems[index].test_cases = test_cases
cache_data[platform][contest_id].problems[index].timeout_ms = timeout_ms or 0
cache_data[platform][contest_id].problems[index].memory_mb = memory_mb or 0
cache_data[platform][contest_id].problems[index].timeout_ms = timeout_ms
cache_data[platform][contest_id].problems[index].memory_mb = memory_mb
cache_data[platform][contest_id].problems[index].interactive = interactive
M.save()
end

View file

@ -72,7 +72,8 @@ function M.setup_contest(platform, contest_id, problem_id, language)
ev.problem_id,
cached_tests,
ev.timeout_ms or 0,
ev.memory_mb or 0
ev.memory_mb or 0,
ev.interactive
)
logger.log('Test cases loaded.')
end)