chore(parser/healthcheck): more logs
This commit is contained in:
		
							parent
							
								
									85e53f4f90
								
							
						
					
					
						commit
						d0c6d27637
					
				|  | @ -3,6 +3,7 @@ package healthcheck | ||||||
| import ( | import ( | ||||||
| 	"encoding/json" | 	"encoding/json" | ||||||
| 	"fmt" | 	"fmt" | ||||||
|  | 	"log/slog" | ||||||
| 
 | 
 | ||||||
| 	"github.com/criyle/go-judge/envexec" | 	"github.com/criyle/go-judge/envexec" | ||||||
| 	"github.com/joint-online-judge/JOJ3/internal/stage" | 	"github.com/joint-online-judge/JOJ3/internal/stage" | ||||||
|  | @ -19,6 +20,7 @@ type Conf struct { | ||||||
| func Parse(executorResult stage.ExecutorResult, conf Conf) (stage.ParserResult, bool) { | func Parse(executorResult stage.ExecutorResult, conf Conf) (stage.ParserResult, bool) { | ||||||
| 	stdout := executorResult.Files[conf.Stdout] | 	stdout := executorResult.Files[conf.Stdout] | ||||||
| 	stderr := executorResult.Files[conf.Stderr] | 	stderr := executorResult.Files[conf.Stderr] | ||||||
|  | 	slog.Debug("healthcheck files", "stdout", stdout, "stderr", stderr) | ||||||
| 	if executorResult.Status != stage.Status(envexec.StatusAccepted) { | 	if executorResult.Status != stage.Status(envexec.StatusAccepted) { | ||||||
| 		return stage.ParserResult{ | 		return stage.ParserResult{ | ||||||
| 			Score: 0, | 			Score: 0, | ||||||
|  | @ -39,6 +41,7 @@ func Parse(executorResult stage.ExecutorResult, conf Conf) (stage.ParserResult, | ||||||
| 			), | 			), | ||||||
| 		}, true | 		}, true | ||||||
| 	} | 	} | ||||||
|  | 	slog.Debug("healthcheck result", "res", res) | ||||||
| 	comment := res.Msg | 	comment := res.Msg | ||||||
| 	forceQuit := res.Failed | 	forceQuit := res.Failed | ||||||
| 	return stage.ParserResult{ | 	return stage.ParserResult{ | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user