Added "Preparing" stage for admins to set the db to when kickoff is ready. Reduced the pre-start signup for WC queues to 30 minutes to avoid issues with long timeouts.

This commit is contained in:
Christian 'ketura' McCarty
2023-08-26 00:08:39 -05:00
parent 8e60f682fc
commit 90babc2e68
3 changed files with 7 additions and 2 deletions

View File

@@ -307,7 +307,11 @@ public class DefaultTournament implements Tournament {
if (_tournamentStage == Stage.AWAITING_KICKOFF) {
}
if (_tournamentStage == Stage.PLAYING_GAMES) {
else if (_tournamentStage == Stage.PREPARING) {
_tournamentStage = Stage.PLAYING_GAMES;
_tournamentService.updateTournamentStage(_tournamentId, _tournamentStage);
}
else if (_tournamentStage == Stage.PLAYING_GAMES) {
if (_currentlyPlayingPlayers.size() == 0) {
if (_pairingMechanism.isFinished(_tournamentRound, _players, _droppedPlayers)) {
finishTournament(tournamentCallback, collectionsManager);

View File

@@ -15,7 +15,7 @@ import java.util.Date;
public class ScheduledTournamentQueue extends AbstractTournamentQueue implements TournamentQueue {
private static final Duration _signupTimeBeforeStart = Duration.ofMinutes(60);
private static final Duration _wcSignupTimeBeforeStart = Duration.ofHours(24);
private static final Duration _wcSignupTimeBeforeStart = Duration.ofHours(30);
private final ZonedDateTime _startTime;
private final int _minimumPlayers;
private final String _startCondition;

View File

@@ -14,6 +14,7 @@ public interface Tournament {
DRAFT("Drafting"),
DECK_BUILDING("Deck building"),
AWAITING_KICKOFF("Awaiting kickoff"),
PREPARING("Preparing"),
PLAYING_GAMES("Playing games"),
FINISHED("Finished");