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:
@@ -307,7 +307,11 @@ public class DefaultTournament implements Tournament {
|
|||||||
if (_tournamentStage == Stage.AWAITING_KICKOFF) {
|
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 (_currentlyPlayingPlayers.size() == 0) {
|
||||||
if (_pairingMechanism.isFinished(_tournamentRound, _players, _droppedPlayers)) {
|
if (_pairingMechanism.isFinished(_tournamentRound, _players, _droppedPlayers)) {
|
||||||
finishTournament(tournamentCallback, collectionsManager);
|
finishTournament(tournamentCallback, collectionsManager);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import java.util.Date;
|
|||||||
|
|
||||||
public class ScheduledTournamentQueue extends AbstractTournamentQueue implements TournamentQueue {
|
public class ScheduledTournamentQueue extends AbstractTournamentQueue implements TournamentQueue {
|
||||||
private static final Duration _signupTimeBeforeStart = Duration.ofMinutes(60);
|
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 ZonedDateTime _startTime;
|
||||||
private final int _minimumPlayers;
|
private final int _minimumPlayers;
|
||||||
private final String _startCondition;
|
private final String _startCondition;
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ public interface Tournament {
|
|||||||
DRAFT("Drafting"),
|
DRAFT("Drafting"),
|
||||||
DECK_BUILDING("Deck building"),
|
DECK_BUILDING("Deck building"),
|
||||||
AWAITING_KICKOFF("Awaiting kickoff"),
|
AWAITING_KICKOFF("Awaiting kickoff"),
|
||||||
|
PREPARING("Preparing"),
|
||||||
PLAYING_GAMES("Playing games"),
|
PLAYING_GAMES("Playing games"),
|
||||||
FINISHED("Finished");
|
FINISHED("Finished");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user