aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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
}