Skip to content

Commit

Permalink
長時間配信枠追加 (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
tukeJonny authored Nov 24, 2023
1 parent c18a67a commit 1b79857
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions bench/scenario/streamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,21 @@ func BasicStreamerColdReserveScenario(
}
}

reservation, err := scheduler.ReservationSched.GetColdShortReservation()
if err != nil {
lgr.Warnf("reserve: failed to get cold short reservation: %s\n", err.Error())
return err
var reservation *scheduler.Reservation
if n%2 == 0 {
r, err := scheduler.ReservationSched.GetColdShortReservation()
if err != nil {
lgr.Warnf("reserve: failed to get cold short reservation: %s\n", err.Error())
return err
}
reservation = r
} else {
r, err := scheduler.ReservationSched.GetColdLongReservation()
if err != nil {
lgr.Warnf("reserve: failed to get cold long reservation: %s\n", err.Error())
return err
}
reservation = r
}

tags, err := client.GetRandomLivestreamTags(ctx, 5)
Expand Down

0 comments on commit 1b79857

Please sign in to comment.