mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-08 14:48:41 +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') {
|
if (config.test_sample_only === 'on') {
|
||||||
await request('/submit', {
|
await request('/submit', {
|
||||||
submit: true,
|
submit: 1,
|
||||||
fetch_new: false,
|
fetch_new: 0,
|
||||||
id,
|
id,
|
||||||
result: JSON.stringify({
|
result: JSON.stringify({
|
||||||
status: 'Judged',
|
status: 'Judged',
|
||||||
@ -80,6 +80,8 @@ export default async function daemon(config: UOJConfig) {
|
|||||||
judge_time,
|
judge_time,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await sleep(TIME.second);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,8 +117,8 @@ export default async function daemon(config: UOJConfig) {
|
|||||||
code = fs.readFileSync(sourceCodePath, 'utf-8');
|
code = fs.readFileSync(sourceCodePath, 'utf-8');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await request('/submit', {
|
await request('/submit', {
|
||||||
submit: true,
|
submit: 1,
|
||||||
fetch_new: false,
|
fetch_new: 0,
|
||||||
id,
|
id,
|
||||||
result: JSON.stringify({
|
result: JSON.stringify({
|
||||||
status: 'Judged',
|
status: 'Judged',
|
||||||
@ -135,6 +137,8 @@ export default async function daemon(config: UOJConfig) {
|
|||||||
|
|
||||||
fs.removeSync(tmpdir);
|
fs.removeSync(tmpdir);
|
||||||
|
|
||||||
|
await sleep(TIME.second);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,8 +156,8 @@ export default async function daemon(config: UOJConfig) {
|
|||||||
);
|
);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
await request('/submit', {
|
await request('/submit', {
|
||||||
submit: true,
|
submit: 1,
|
||||||
fetch_new: false,
|
fetch_new: 0,
|
||||||
id,
|
id,
|
||||||
result: JSON.stringify({
|
result: JSON.stringify({
|
||||||
status: 'Judged',
|
status: 'Judged',
|
||||||
@ -172,6 +176,8 @@ export default async function daemon(config: UOJConfig) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fs.removeSync(tmpdir);
|
fs.removeSync(tmpdir);
|
||||||
|
|
||||||
|
await sleep(TIME.second);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
logger.error(err.message);
|
logger.error(err.message);
|
||||||
|
@ -98,8 +98,8 @@ class VJudge {
|
|||||||
) {
|
) {
|
||||||
const next = async payload => {
|
const next = async payload => {
|
||||||
return await this.request('/submit', {
|
return await this.request('/submit', {
|
||||||
'update-status': true,
|
'update-status': 1,
|
||||||
fetch_new: false,
|
fetch_new: 0,
|
||||||
id,
|
id,
|
||||||
status:
|
status:
|
||||||
payload.status ||
|
payload.status ||
|
||||||
@ -110,8 +110,8 @@ class VJudge {
|
|||||||
const end = async payload => {
|
const end = async payload => {
|
||||||
if (payload.error) {
|
if (payload.error) {
|
||||||
return await this.request('/submit', {
|
return await this.request('/submit', {
|
||||||
submit: true,
|
submit: 1,
|
||||||
fetch_new: false,
|
fetch_new: 0,
|
||||||
id,
|
id,
|
||||||
result: JSON.stringify({
|
result: JSON.stringify({
|
||||||
status: 'Judged',
|
status: 'Judged',
|
||||||
@ -128,8 +128,8 @@ class VJudge {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return await this.request('/submit', {
|
return await this.request('/submit', {
|
||||||
submit: true,
|
submit: 1,
|
||||||
fetch_new: false,
|
fetch_new: 0,
|
||||||
id,
|
id,
|
||||||
result: JSON.stringify({
|
result: JSON.stringify({
|
||||||
status: 'Judged',
|
status: 'Judged',
|
||||||
|
Loading…
Reference in New Issue
Block a user