feat(parser/resultstatus): conf force quit on not accepted
This commit is contained in:
		
							parent
							
								
									fc86f93dc9
								
							
						
					
					
						commit
						fa649fcabe
					
				|  | @ -10,6 +10,7 @@ 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,8 +32,10 @@ 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, | ||||||
| 			) | 			) | ||||||
|  | 			if conf.ForceQuitOnNotAccepted { | ||||||
| 				forceQuit = true | 				forceQuit = true | ||||||
| 			} | 			} | ||||||
|  | 		} | ||||||
| 		res = append(res, stage.ParserResult{ | 		res = append(res, stage.ParserResult{ | ||||||
| 			Score:   score, | 			Score:   score, | ||||||
| 			Comment: comment, | 			Comment: comment, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user