Add map-specific tournament creation link
Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 3m31s
Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 3m31s
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user