report broadcast errors that prevent start
parent
7047222889
commit
51286511fd
|
@ -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, _) }
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue