feat(parser/resultstatus): conf force quit on not accepted
This commit is contained in:
parent
fc86f93dc9
commit
fa649fcabe
|
@ -8,8 +8,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type Conf struct {
|
type Conf struct {
|
||||||
Score int
|
Score int
|
||||||
Comment string
|
Comment string
|
||||||
|
ForceQuitOnNotAccepted bool `default:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResultStatus struct{}
|
type ResultStatus struct{}
|
||||||
|
@ -31,7 +32,9 @@ func (*ResultStatus) Run(results []stage.ExecutorResult, confAny any) (
|
||||||
comment = fmt.Sprintf(
|
comment = fmt.Sprintf(
|
||||||
"Unexpected executor status: %s.", result.Status,
|
"Unexpected executor status: %s.", result.Status,
|
||||||
)
|
)
|
||||||
forceQuit = true
|
if conf.ForceQuitOnNotAccepted {
|
||||||
|
forceQuit = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
res = append(res, stage.ParserResult{
|
res = append(res, stage.ParserResult{
|
||||||
Score: score,
|
Score: score,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user