Skip to content

Commit

Permalink
fix broadcast lcc delay
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Jun 20, 2024
1 parent b58a6da commit c0661c1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions modules/relay/src/main/RelayFetch.scala
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,12 @@ final private class RelayFetch(
private def fetchGames(rt: RelayRound.WithTour): Fu[RelayGames] =
given CanProxy = CanProxy(rt.tour.official)
rt.round.sync.upstream.so:
case Sync.UpstreamIds(ids) => fetchFromGameIds(rt.tour, ids)
case lcc: Sync.UpstreamLcc => fetchFromUpstream(lcc, RelayFetch.maxChapters)
case url: Sync.UpstreamUrl => delayer(url, rt.round, fetchFromUpstream)
case Sync.UpstreamIds(ids) => fetchFromGameIds(rt.tour, ids)
case urlOrLcc: Sync.FetchableUpstream => delayer(urlOrLcc, rt.round, fetchFromUpstream)
case Sync.UpstreamUrls(urls) =>
urls
.traverse: url =>
delayer(url, rt.round, fetchFromUpstream(using CanProxy(rt.tour.official)))
delayer(url, rt.round, fetchFromUpstream)
.map(_.flatten.toVector)

private def fetchFromGameIds(tour: RelayTour, ids: List[GameId]): Fu[RelayGames] =
Expand Down

0 comments on commit c0661c1

Please sign in to comment.