mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-25 20:38:41 +00:00
feat(remote_judger): sample test
This commit is contained in:
parent
3d6102a3f9
commit
6407895ae2
@ -65,6 +65,24 @@ export default async function daemon(config: UOJConfig) {
|
||||
const config = Object.fromEntries(content.config);
|
||||
const tmpdir = `/tmp/s2oj_rmj/${id}/`;
|
||||
|
||||
if (config.test_sample_only === 'on') {
|
||||
await request('/submit', {
|
||||
submit: true,
|
||||
fetch_new: false,
|
||||
id,
|
||||
result: JSON.stringify({
|
||||
status: 'Judged',
|
||||
score: 100,
|
||||
time: 0,
|
||||
memory: 0,
|
||||
details: '<info-block>Sample test is not available.</info-block>',
|
||||
}),
|
||||
judge_time,
|
||||
});
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
fs.ensureDirSync(tmpdir);
|
||||
|
||||
const reportError = async (error: string, details: string) => {
|
||||
|
Loading…
Reference in New Issue
Block a user