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) => { roughProgressNamespace = initializeNamespace('rough', async (req, socket) => {
const taskId = req.taskId; const taskId = req.taskId;
if (currentJudgeList[taskId]) { if (finishedJudgeList[taskId]) {
return {
ok: true,
running: true,
finished: false
};
} else if (finishedJudgeList[taskId]) {
return { return {
ok: true, ok: true,
running: false, running: false,
finished: true, finished: true,
result: processRoughResult(finishedJudgeList[taskId], clientDisplayConfigList[socket.id]) result: processRoughResult(finishedJudgeList[taskId], clientDisplayConfigList[socket.id])
}; };
}
else if (currentJudgeList[taskId]) {
return {
ok: true,
running: true,
finished: false
};
} else { } else {
return { return {
ok: true, ok: true,

Loading…
Cancel
Save