Browse Source

Fix rough progress showing running even if it's finished.

master
t123yh 7 years ago
parent
commit
1121bf380d
  1. 15
      src/daemon-frontend-syzoj/socketio.ts

15
src/daemon-frontend-syzoj/socketio.ts

@ -189,19 +189,20 @@ export function initializeSocketIO(s: http.Server) {
roughProgressNamespace = initializeNamespace('rough', async (req, socket) => {
const taskId = req.taskId;
if (currentJudgeList[taskId]) {
return {
ok: true,
running: true,
finished: false
};
} else if (finishedJudgeList[taskId]) {
if (finishedJudgeList[taskId]) {
return {
ok: true,
running: false,
finished: true,
result: processRoughResult(finishedJudgeList[taskId], clientDisplayConfigList[socket.id])
};
}
else if (currentJudgeList[taskId]) {
return {
ok: true,
running: true,
finished: false
};
} else {
return {
ok: true,

Loading…
Cancel
Save