Add map-specific tournament creation link
Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 3m31s

This commit is contained in:
2026-10-18 13:32:56 +05:00
parent a7085e4e80
commit da1a50a6ad
10 changed files with 74 additions and 9 deletions

View File

@@ -23,14 +23,24 @@ let tournamentWarningAt = 0;
async function tickTournaments() {
if (stopping || tournamentTickRunning) return;
tournamentTickRunning = true;
let phase = "scheduling";
try {
check(await client.rpc("tick_tournaments"));
const result = await client.rpc("tick_tournaments");
if (result.error)
throw new Error(
`${result.error.code || "RPC error"}: ${result.error.message}`,
);
phase = "Discord announcements";
await dispatchTournamentAnnouncements(client);
} catch {
if (tournamentWarningAt) {
console.info("Tournament scheduling and announcements resumed.");
tournamentWarningAt = 0;
}
} catch (error) {
if (Date.now() - tournamentWarningAt >= 300000) {
tournamentWarningAt = Date.now();
console.error(
"Tournament scheduling paused; check database migrations and connectivity. The worker will retry.",
`Tournament ${phase} paused: ${summarizeWorkerError(error)}. The worker will retry in 30 seconds.`,
);
}
} finally {