Fixed - unstarted scheduled queues that are past their start time no longer peek every 60 secs

This commit is contained in:
jakub.salavec
2025-05-14 14:47:05 +02:00
parent b533b78880
commit 93b7114b7f

View File

@@ -222,10 +222,12 @@ public class DbTournamentDAO implements TournamentDAO {
SELECT id, tournament_id, name, format, start_date, type, parameters, started
FROM scheduled_tournament
WHERE started = 0
AND start_date <= :start;
AND start_date <= :start
AND start_date >= :now;
""";
List<DBDefs.ScheduledTournament> result = conn.createQuery(sql)
.addParameter("start", tillDate)
.addParameter("now", ZonedDateTime.now())
.executeAndFetch(DBDefs.ScheduledTournament.class);
return result;