report broadcast errors that prevent start

pull/9751/head
Thibault Duplessis 2021-09-07 18:50:33 +02:00
parent 7047222889
commit 51286511fd
2 changed files with 3 additions and 2 deletions

View File

@ -116,7 +116,7 @@ final private class RelayFetch(
rt.round.sync.log.events.lastOption
.filterNot(_.isTimeout)
.flatMap(_.error)
.ifTrue(rt.tour.official && rt.round.hasStarted)
.ifTrue(rt.tour.official && rt.round.shouldHaveStarted)
.filterNot(_ contains "Cannot parse moves")
.filterNot(_ contains "Found an empty PGN")
.foreach { irc.broadcastError(rt.round.id.value, rt.fullName, _) }

View File

@ -46,7 +46,8 @@ case class RelayRound(
startedAt = startedAt orElse DateTime.now.some
)
def hasStarted = startedAt.isDefined
def hasStarted = startedAt.isDefined
def shouldHaveStarted = hasStarted || startsAt.exists(DateTime.now.isBefore)
def shouldGiveUp =
!hasStarted && (startsAt match {