From f3e6d0f3c062c587db6a97d955a8f87d36e18fb2 Mon Sep 17 00:00:00 2001 From: Masahiro Nagano Date: Sat, 25 Nov 2023 14:02:05 +0900 Subject: [PATCH] Revert "searchlivestreams on final check" --- bench/cmd/bench/supervise.go | 9 ++++---- bench/scenario/core_finalcheck.go | 36 +++---------------------------- 2 files changed, 8 insertions(+), 37 deletions(-) diff --git a/bench/cmd/bench/supervise.go b/bench/cmd/bench/supervise.go index ce69d6452..27a98e467 100644 --- a/bench/cmd/bench/supervise.go +++ b/bench/cmd/bench/supervise.go @@ -395,10 +395,11 @@ var supervise = cli.Command{ NotifyWorkerErr(job, err, "", "", "ベンチマーカーの結果送信に失敗。すぐに調査してください。supervisorの処理は継続します") } - log.Println("upload finalcheck result") - if err := UploadFinalcheckResult(finalcheckBucketName, job.ID, job.Team); err != nil { - NotifyWorkerErr(job, err, "", "", "FinalCheckの結果送信に失敗。すぐに調査してください。supervisorの処理は継続します") - } + _ = finalcheckBucketName + // log.Println("upload finalcheck result") + // if err := UploadFinalcheckResult(finalcheckBucketName, job.ID, job.Team); err != nil { + // NotifyWorkerErr(job, err, "", "", "FinalCheckの結果送信に失敗。すぐに調査してください。supervisorの処理は継続します") + // } log.Println("cleanup old logs for next job") os.Remove(config.StaffLogPath) diff --git a/bench/scenario/core_finalcheck.go b/bench/scenario/core_finalcheck.go index 1cf6a0f9a..1cf236850 100644 --- a/bench/scenario/core_finalcheck.go +++ b/bench/scenario/core_finalcheck.go @@ -2,9 +2,7 @@ package scenario import ( "context" - "encoding/json" "os" - "time" "github.com/isucon/isucandar/agent" "github.com/isucon/isucon13/bench/internal/config" @@ -15,17 +13,6 @@ import ( func FinalcheckScenario(ctx context.Context, contestantLogger *zap.Logger, dnsResolver *resolver.DNSResolver) error { - // 3秒待つ -loop: - for { - select { - case <-ctx.Done(): - return ctx.Err() - case <-time.After(3 * time.Second): - break loop - } - } - client, err := isupipe.NewCustomResolverClient( contestantLogger, dnsResolver, @@ -34,28 +21,11 @@ loop: if err != nil { return err } - // タグ指定なし検索 - searchedStream, err := client.SearchLivestreams(ctx, isupipe.WithLimitQueryParam(config.NumSearchLivestreams)) - if err != nil { - return err - } - lgr := zap.S() - ids := []int64{} - for _, stream := range searchedStream { - ids = append(ids, stream.ID) - } - b, err := json.Marshal(ids) - if err != nil { - return err - } - lgr.Info("Finalcheck SearchLivestreams IDs:", string(b)) - b2, err := json.Marshal(searchedStream) - if err != nil { - return err - } + // FIXME: ライブコメント存在チェック + _ = client - if err := os.WriteFile(config.FinalcheckPath, b2, os.ModePerm); err != nil { + if err := os.WriteFile(config.FinalcheckPath, []byte("{}"), os.ModePerm); err != nil { return err }