aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/taskqueue
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-07 22:44:08 +0900
committernsfisis <nsfisis@gmail.com>2024-08-08 04:02:37 +0900
commitd799993a4fe0d05aa72c9a48d4a76c6db2240038 (patch)
tree5cea8c2a06029cbed9b4ed642545567a899c63aa /backend/taskqueue
parent963292574fd72ec62ebc75c308f1275de531a2e9 (diff)
downloadphperkaigi-2025-albatross-d799993a4fe0d05aa72c9a48d4a76c6db2240038.tar.gz
phperkaigi-2025-albatross-d799993a4fe0d05aa72c9a48d4a76c6db2240038.tar.zst
phperkaigi-2025-albatross-d799993a4fe0d05aa72c9a48d4a76c6db2240038.zip
feat(backend): make testcase_executions.testcase_id non-null
Diffstat (limited to 'backend/taskqueue')
-rw-r--r--backend/taskqueue/processor.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/taskqueue/processor.go b/backend/taskqueue/processor.go
index ca180e9..098b565 100644
--- a/backend/taskqueue/processor.go
+++ b/backend/taskqueue/processor.go
@@ -168,7 +168,7 @@ func (p *ExecProcessor) ProcessTask(ctx context.Context, t *asynq.Task) error {
if resData.Result != "success" {
err := p.q.CreateTestcaseExecution(ctx, db.CreateTestcaseExecutionParams{
SubmissionID: submissionID,
- TestcaseID: &testcase.TestcaseID,
+ TestcaseID: testcase.TestcaseID,
Status: resData.Result,
Stdout: resData.Stdout,
Stderr: resData.Stderr,
@@ -185,7 +185,7 @@ func (p *ExecProcessor) ProcessTask(ctx context.Context, t *asynq.Task) error {
if !isTestcaseExecutionCorrect(testcase.Stdout, resData.Stdout) {
err := p.q.CreateTestcaseExecution(ctx, db.CreateTestcaseExecutionParams{
SubmissionID: submissionID,
- TestcaseID: &testcase.TestcaseID,
+ TestcaseID: testcase.TestcaseID,
Status: "wrong_answer",
Stdout: resData.Stdout,
Stderr: resData.Stderr,