Skip to content

Commit

Permalink
fix(be): using correct judge result code (#2252)
Browse files Browse the repository at this point in the history
* fix(be): using correct judge result code

* fix(be): using correct judge result code
  • Loading branch information
jspark2000 authored Dec 5, 2024
1 parent 4ab66a9 commit cb84fa9
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions apps/backend/apps/client/src/submission/submission-sub.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,14 @@ export class SubmissionSubscriptionService implements OnModuleInit {
isUserTest
? userTestKey(userId, testcaseId)
: testKey(userId, testcaseId),
{ id: testcaseId, result: status, output },
{
id: testcaseId,
// TODO: judgeResult 코드 처리 통합 해야함
result: msg.judgeResult
? Status(msg.judgeResult.resultCode)
: Status(msg.resultCode),
output
},
TEST_SUBMISSION_EXPIRE_TIME
)
}
Expand All @@ -123,7 +130,10 @@ export class SubmissionSubscriptionService implements OnModuleInit {
}>(key)
if (testcase) {
testcase.id = testcaseId
testcase.result = status
// TODO: judgeResult 코드 처리 통합 해야함
testcase.result = msg.judgeResult
? Status(msg.judgeResult.resultCode)
: Status(msg.resultCode)
testcase.output = output
}

Expand Down Expand Up @@ -171,7 +181,8 @@ export class SubmissionSubscriptionService implements OnModuleInit {
const submissionResult = {
submissionId: msg.submissionId,
problemTestcaseId: msg.judgeResult.testcaseId,
result: status,
// TODO: judgeResult 코드 처리 통합 해야함
result: Status(msg.judgeResult.resultCode),
cpuTime: BigInt(msg.judgeResult.cpuTime),
memoryUsage: msg.judgeResult.memory
}
Expand Down

0 comments on commit cb84fa9

Please sign in to comment.