fix(phase-4): close review notes — drop dead var, sync UI cron default
Phase 4 reviewer (Sonnet) flagged two 🟡 warnings; both addressed:
1. PullLiveOddsUseCase: removed dead 'liveEvents' assignment that called
ScrapeUpcomingAsync but never read the result. Replaced misleading
comment block with a single TODO(phase-6/8) note pointing to the
ListLiveAsync(cutoff) follow-up.
2. Marathon.UI.Services.WorkerOptions.UpcomingScheduleCron: changed default
from '0 */5 * * * *' (every 5 min) to '0 0 */6 * * *' (every 6 hours)
to match Marathon.Infrastructure.Configuration.WorkerOptions and the
appsettings.json default.
PLAN.md: Phase 4 row updated (review status, commit hash); top-level
checkbox in Phases list ticked.
Build 0/0, all 202 tests still passing.
This commit is contained in:
@@ -38,7 +38,7 @@ parameter configurable.
|
||||
- [x] Phase 1: Solution skeleton + Domain model [domain: backend] → [subplan](./phase-1-solution-and-domain.md)
|
||||
- [ ] Phase 2: Infrastructure — Storage [domain: backend] → [subplan](./phase-2-storage.md)
|
||||
- [ ] Phase 3: Infrastructure — Scraping [domain: backend] → [subplan](./phase-3-scraping.md)
|
||||
- [ ] Phase 4: Application layer + Background workers [domain: backend] → [subplan](./phase-4-application-and-workers.md)
|
||||
- [x] Phase 4: Application layer + Background workers [domain: backend] → [subplan](./phase-4-application-and-workers.md)
|
||||
- [ ] Phase 5: Blazor Hybrid host + Theme + i18n [domain: frontend] → [subplan](./phase-5-host-theme-i18n.md)
|
||||
- [ ] Phase 6: Event browsing UI [domain: frontend] → [subplan](./phase-6-event-browsing-ui.md)
|
||||
- [ ] Phase 7: Anomaly detection [domain: fullstack] → [subplan](./phase-7-anomaly-detection.md)
|
||||
@@ -66,7 +66,7 @@ parameter configurable.
|
||||
| Phase 1: Solution + Domain | backend | ✅ Done | ⚠️ Pass with notes (Sonnet) | ✅ Build OK + 96/96 Domain tests | ✅ 61114ea |
|
||||
| Phase 2: Storage | backend | ✅ Done | ⚠️ Pass with notes (Sonnet, combined batch) | ✅ Build OK + 77/77 Infra tests | ✅ batch (e4d8476…686550d…+) |
|
||||
| Phase 3: Scraping | backend | ✅ Done | ⚠️ Pass with notes (Sonnet, combined batch) | ✅ Build OK + 77/77 Infra tests | ✅ batch (e4d8476…686550d…+) |
|
||||
| Phase 4: Application + Workers | backend | ✅ Done | ⬜ | ✅ Build OK + 202/202 tests | ⬜ |
|
||||
| Phase 4: Application + Workers | backend | ✅ Done | ⚠️ Pass with notes (Sonnet) | ✅ Build OK + 202/202 tests | ✅ 2acbaa5 |
|
||||
| Phase 5: Host + Theme + i18n | frontend | ✅ Done | ⚠️ Pass with notes (Sonnet, combined batch) | ✅ Build OK + 11/11 UI tests | ✅ batch (e4d8476…686550d…+) |
|
||||
| Phase 6: Event browsing UI | frontend | ⬜ Not Started | ⬜ | ⏭️ Big Bang | ⬜ |
|
||||
| Phase 7: Anomaly detection | fullstack | ⬜ Not Started | ⬜ | ⏭️ Big Bang | ⬜ |
|
||||
|
||||
@@ -36,13 +36,11 @@ public sealed class PullLiveOddsUseCase
|
||||
{
|
||||
_logger.LogInformation("PullLiveOddsUseCase: cycle started");
|
||||
|
||||
// Fetch live events from scraper — returns only events currently live on site.
|
||||
var liveEvents = await _scraper.ScrapeUpcomingAsync(sportFilter: null, ct);
|
||||
|
||||
// Note: the scraper's ScrapeUpcomingAsync returns pre-match by default.
|
||||
// For the live cycle, we load known events from the DB and refresh each one.
|
||||
// The "live vs pre-match" distinction is handled by OddsSource.Live in the snapshot.
|
||||
// We use the DB list because the site's live listing may differ from what we track.
|
||||
// Refresh odds for every event we already track. The "live vs pre-match"
|
||||
// distinction is recorded by stamping each snapshot with OddsSource.Live.
|
||||
// TODO(phase-6/8): once IEventRepository.ListLiveAsync(cutoff) ships, swap
|
||||
// this for a filter that only returns currently-live events to avoid
|
||||
// hammering the scraper with non-live IDs.
|
||||
var allEvents = await _eventRepo.ListAsync(ct);
|
||||
|
||||
int snapshotsCaptured = 0;
|
||||
|
||||
@@ -9,7 +9,7 @@ public sealed class WorkerOptions
|
||||
public const string SectionName = "Workers";
|
||||
|
||||
/// <summary>Cron expression that drives the upcoming-schedule poller.</summary>
|
||||
public string UpcomingScheduleCron { get; set; } = "0 */5 * * * *";
|
||||
public string UpcomingScheduleCron { get; set; } = "0 0 */6 * * *";
|
||||
|
||||
/// <summary>Whether the live odds poller should run at startup.</summary>
|
||||
public bool LivePollerEnabled { get; set; } = true;
|
||||
|
||||
Reference in New Issue
Block a user