From fa649fcabed7111ed18cac16112a7255a269c48c Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Fri, 1 Nov 2024 18:39:36 -0400 Subject: [PATCH] feat(parser/resultstatus): conf force quit on not accepted --- internal/parser/resultstatus/parser.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/parser/resultstatus/parser.go b/internal/parser/resultstatus/parser.go index 79a60a1..b5150e5 100644 --- a/internal/parser/resultstatus/parser.go +++ b/internal/parser/resultstatus/parser.go @@ -8,8 +8,9 @@ import ( ) type Conf struct { - Score int - Comment string + Score int + Comment string + ForceQuitOnNotAccepted bool `default:"false"` } type ResultStatus struct{} @@ -31,7 +32,9 @@ func (*ResultStatus) Run(results []stage.ExecutorResult, confAny any) ( comment = fmt.Sprintf( "Unexpected executor status: %s.", result.Status, ) - forceQuit = true + if conf.ForceQuitOnNotAccepted { + forceQuit = true + } } res = append(res, stage.ParserResult{ Score: score,