diff --git a/backend/src/api/admin.ts b/backend/src/api/admin.ts index a490b62..240f064 100644 --- a/backend/src/api/admin.ts +++ b/backend/src/api/admin.ts @@ -306,7 +306,7 @@ export async function registerAdminRoutes(app: FastifyInstance) { { currencyId: base.currencyId, name: base.name, icon: base.icon ?? null }, { currencyId: quote.currencyId, name: quote.name, icon: quote.icon ?? null } ); - // Poll immediately rather than waiting for the next tick (up to 15 minutes) — cheap, + // Poll immediately rather than waiting for the next tick (up to 1 hour) — cheap, // and refreshes every existing entry's rate too. pollPoe2Now().catch((err) => logger.error('poe2', `Immediate poll failed: ${err.message}`)); return reply.code(201).send(created); diff --git a/backend/src/queue/scheduler.ts b/backend/src/queue/scheduler.ts index cbf6a14..b9d958c 100644 --- a/backend/src/queue/scheduler.ts +++ b/backend/src/queue/scheduler.ts @@ -14,7 +14,7 @@ const SYNTHESIS_TICK_MS = 60_000; const RETENTION_TICK_MS = 60 * 60_000; // hourly const WEATHER_TICK_MS = 45 * 60_000; const STOCKS_TICK_MS = 15 * 60_000; // per admin spec — stock prices move faster than weather -const POE2_TICK_MS = 15 * 60_000; // matches Stocks' cadence +const POE2_TICK_MS = 60 * 60_000; // poe.ninja's own overview data doesn't refresh faster than hourly, so polling more often than this just re-fetches the same numbers export function startScheduler() { const provider = () => { @@ -67,9 +67,9 @@ export function startScheduler() { } }, RETENTION_TICK_MS); - // Immediate first call for both — unlike RSS sources (whose "due" check makes a - // brand-new source eligible on the very next 1-minute tick), weather/stocks have no - // such shortcut; without this the sidebar is empty for up to 45/15 minutes after + // Immediate first call for all three — unlike RSS sources (whose "due" check makes a + // brand-new source eligible on the very next 1-minute tick), weather/stocks/poe2 have + // no such shortcut; without this the sidebar is empty for up to 45/15/60 minutes after // every restart. pollWeatherNow().catch((err) => logger.error('weather', `Initial poll failed: ${err.message}`)); setInterval(() => { @@ -86,5 +86,5 @@ export function startScheduler() { pollPoe2Now().catch((err) => logger.error('poe2', `Poll tick failed: ${err.message}`)); }, POE2_TICK_MS); - logger.info('scheduler', 'Started: poll every 1m, synthesis every 1m, retention every 1h, weather every 45m, stocks every 15m, poe2 every 15m'); + logger.info('scheduler', 'Started: poll every 1m, synthesis every 1m, retention every 1h, weather every 45m, stocks every 15m, poe2 every 1h'); } diff --git a/frontend/src/lib/components/admin/Poe2Tab.svelte b/frontend/src/lib/components/admin/Poe2Tab.svelte index e5b6df4..39dc456 100644 --- a/frontend/src/lib/components/admin/Poe2Tab.svelte +++ b/frontend/src/lib/components/admin/Poe2Tab.svelte @@ -82,7 +82,7 @@ {#if settings.poe2.leagueName} Tracking {settings.poe2.leagueName} · change is over the last 1h / 24h / 7d. {:else} - League not detected yet — check back after the next poll (every 15 minutes). + League not detected yet — check back after the next poll (every hour). {/if}