judge: use compileInteractor and per file cleanup

This commit is contained in:
undefined committed 2022-09-06 13:02:46 +08:00
1 parent 15ea8232a8
commit 5e113d9c7e
5 files changed
+52 -27

No files matched your search

+3
View File
@@ -1,5 +1,6 @@
/* eslint-disable no-await-in-loop */
import { sleep } from '@hydrooj/utils/lib/utils';
import { writeFileSync } from 'fs-extra';
import * as Judge from 'hydrooj/src/handler/judge';
import { Logger } from 'hydrooj/src/logger';
import { STATUS } from 'hydrooj/src/model/builtin';
@@ -55,6 +56,8 @@ class Service {
async sync(domainId: string, resync = false, list: string) {
let page = 1;
const res = await this.api.getProblem('P1721D', {});
writeFileSync('a.md', res.content);
let pids = await this.api.listProblem(page, resync, list);
while (pids.length) {
logger.info(`${domainId}: Syncing page ${page}`);