fix: write interaction into cache
This commit is contained in:
parent
fd550bc654
commit
cedcd82367
2 changed files with 8 additions and 6 deletions
|
|
@ -160,9 +160,9 @@ end
|
||||||
---@param contest_id string
|
---@param contest_id string
|
||||||
---@param problem_id string
|
---@param problem_id string
|
||||||
---@param test_cases TestCase[]
|
---@param test_cases TestCase[]
|
||||||
---@param timeout_ms? number
|
---@param timeout_ms number
|
||||||
---@param memory_mb? number
|
---@param memory_mb number
|
||||||
---@param interactive? boolean
|
---@param interactive boolean
|
||||||
function M.set_test_cases(
|
function M.set_test_cases(
|
||||||
platform,
|
platform,
|
||||||
contest_id,
|
contest_id,
|
||||||
|
|
@ -185,8 +185,9 @@ function M.set_test_cases(
|
||||||
local index = cache_data[platform][contest_id].index_map[problem_id]
|
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].test_cases = test_cases
|
||||||
cache_data[platform][contest_id].problems[index].timeout_ms = timeout_ms or 0
|
cache_data[platform][contest_id].problems[index].timeout_ms = timeout_ms
|
||||||
cache_data[platform][contest_id].problems[index].memory_mb = memory_mb or 0
|
cache_data[platform][contest_id].problems[index].memory_mb = memory_mb
|
||||||
|
cache_data[platform][contest_id].problems[index].interactive = interactive
|
||||||
|
|
||||||
M.save()
|
M.save()
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,8 @@ function M.setup_contest(platform, contest_id, problem_id, language)
|
||||||
ev.problem_id,
|
ev.problem_id,
|
||||||
cached_tests,
|
cached_tests,
|
||||||
ev.timeout_ms or 0,
|
ev.timeout_ms or 0,
|
||||||
ev.memory_mb or 0
|
ev.memory_mb or 0,
|
||||||
|
ev.interactive
|
||||||
)
|
)
|
||||||
logger.log('Test cases loaded.')
|
logger.log('Test cases loaded.')
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue