mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 09:38:42 +00:00
fix(remote_judger): request fetch_new
option
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
42c473e1a0
commit
51e6711e7c
@ -67,8 +67,8 @@ export default async function daemon(config: UOJConfig) {
|
||||
|
||||
if (config.test_sample_only === 'on') {
|
||||
await request('/submit', {
|
||||
submit: true,
|
||||
fetch_new: false,
|
||||
submit: 1,
|
||||
fetch_new: 0,
|
||||
id,
|
||||
result: JSON.stringify({
|
||||
status: 'Judged',
|
||||
@ -80,6 +80,8 @@ export default async function daemon(config: UOJConfig) {
|
||||
judge_time,
|
||||
});
|
||||
|
||||
await sleep(TIME.second);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -115,8 +117,8 @@ export default async function daemon(config: UOJConfig) {
|
||||
code = fs.readFileSync(sourceCodePath, 'utf-8');
|
||||
} catch (e) {
|
||||
await request('/submit', {
|
||||
submit: true,
|
||||
fetch_new: false,
|
||||
submit: 1,
|
||||
fetch_new: 0,
|
||||
id,
|
||||
result: JSON.stringify({
|
||||
status: 'Judged',
|
||||
@ -135,6 +137,8 @@ export default async function daemon(config: UOJConfig) {
|
||||
|
||||
fs.removeSync(tmpdir);
|
||||
|
||||
await sleep(TIME.second);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -152,8 +156,8 @@ export default async function daemon(config: UOJConfig) {
|
||||
);
|
||||
} catch (err) {
|
||||
await request('/submit', {
|
||||
submit: true,
|
||||
fetch_new: false,
|
||||
submit: 1,
|
||||
fetch_new: 0,
|
||||
id,
|
||||
result: JSON.stringify({
|
||||
status: 'Judged',
|
||||
@ -172,6 +176,8 @@ export default async function daemon(config: UOJConfig) {
|
||||
}
|
||||
|
||||
fs.removeSync(tmpdir);
|
||||
|
||||
await sleep(TIME.second);
|
||||
}
|
||||
} catch (err) {
|
||||
logger.error(err.message);
|
||||
|
@ -98,8 +98,8 @@ class VJudge {
|
||||
) {
|
||||
const next = async payload => {
|
||||
return await this.request('/submit', {
|
||||
'update-status': true,
|
||||
fetch_new: false,
|
||||
'update-status': 1,
|
||||
fetch_new: 0,
|
||||
id,
|
||||
status:
|
||||
payload.status ||
|
||||
@ -110,8 +110,8 @@ class VJudge {
|
||||
const end = async payload => {
|
||||
if (payload.error) {
|
||||
return await this.request('/submit', {
|
||||
submit: true,
|
||||
fetch_new: false,
|
||||
submit: 1,
|
||||
fetch_new: 0,
|
||||
id,
|
||||
result: JSON.stringify({
|
||||
status: 'Judged',
|
||||
@ -128,8 +128,8 @@ class VJudge {
|
||||
}
|
||||
|
||||
return await this.request('/submit', {
|
||||
submit: true,
|
||||
fetch_new: false,
|
||||
submit: 1,
|
||||
fetch_new: 0,
|
||||
id,
|
||||
result: JSON.stringify({
|
||||
status: 'Judged',
|
||||
|
Loading…
Reference in New Issue
Block a user