Skip to content

Commit

Permalink
fix(be): set testcases on cache before publiush message (#2120)
Browse files Browse the repository at this point in the history
  • Loading branch information
jspark2000 authored Sep 24, 2024
1 parent 3176a9f commit e1bfcac
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions apps/backend/apps/client/src/submission/submission.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,17 @@ export class SubmissionService {
})
}

await this.cacheManager.set(
testKey(userId),
testcases,
TEST_SUBMISSION_EXPIRE_TIME
)

await this.publish.publishJudgeRequestMessage(
submissionDto.code,
testSubmission,
true
)

const key = testKey(userId)
await this.cacheManager.set(key, testcases, TEST_SUBMISSION_EXPIRE_TIME)
}

async getTestResult(userId: number) {
Expand Down

0 comments on commit e1bfcac

Please sign in to comment.