aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-05 21:55:35 +0900
committernsfisis <nsfisis@gmail.com>2024-08-05 21:55:35 +0900
commit0429497bb9256ad6e4f93e22b415343b51adebc9 (patch)
tree37e9cf35527f7a728f9a1f795381aa21f9807205 /backend
parent077701d9f6534c4cd37149e59c6d5cf77f868b0e (diff)
downloadiosdc-japan-2024-albatross-0429497bb9256ad6e4f93e22b415343b51adebc9.tar.gz
iosdc-japan-2024-albatross-0429497bb9256ad6e4f93e22b415343b51adebc9.tar.zst
iosdc-japan-2024-albatross-0429497bb9256ad6e4f93e22b415343b51adebc9.zip
fix(backend): fix terribly broken code
Diffstat (limited to 'backend')
-rw-r--r--backend/taskqueue/processor.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/taskqueue/processor.go b/backend/taskqueue/processor.go
index e505c5a..1d4c412 100644
--- a/backend/taskqueue/processor.go
+++ b/backend/taskqueue/processor.go
@@ -173,7 +173,7 @@ func (p *ExecProcessor) ProcessTask(ctx context.Context, t *asynq.Task) error {
p.c <- resData.Result
return fmt.Errorf("testrun failed: %v", resData.Stderr)
}
- if isTestcaseExecutionCorrect(testcase.Stdout, resData.Stdout) {
+ if !isTestcaseExecutionCorrect(testcase.Stdout, resData.Stdout) {
err := p.q.CreateTestcaseExecution(ctx, db.CreateTestcaseExecutionParams{
SubmissionID: submissionID,
TestcaseID: &testcase.TestcaseID,
@@ -189,6 +189,7 @@ func (p *ExecProcessor) ProcessTask(ctx context.Context, t *asynq.Task) error {
}
}
+ p.c <- "success"
return nil
}