From e1bfcac23187b3c1d18136ee25e90781fbb908f5 Mon Sep 17 00:00:00 2001 From: Jisoo Park Date: Tue, 24 Sep 2024 21:41:14 +0900 Subject: [PATCH] fix(be): set testcases on cache before publiush message (#2120) --- .../apps/client/src/submission/submission.service.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/backend/apps/client/src/submission/submission.service.ts b/apps/backend/apps/client/src/submission/submission.service.ts index d34aed9524..b1663d4672 100644 --- a/apps/backend/apps/client/src/submission/submission.service.ts +++ b/apps/backend/apps/client/src/submission/submission.service.ts @@ -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) {