WordCountService: async startup, resilient error handling, SRP

Offen
#1,609 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
42/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
csharp, html
Bereich
backend, performance

Rechercherichtung

Read the WordCountService implementation and its IHostedLifecycleService methods, then trace BuildAsync and the per-file exception handling. Compare startup behavior with the proposed BackgroundService or Lazy<Snapshot> approach; done means startup no longer waits for parsing and file errors do not abort host startup.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Startup parses ~400 HTML files synchronously (BuildAsync returns Task.CompletedTask), blocking host readiness. IHostedLifecycleService has five empty methods, and only some exception types are caught per file, so others abort host start. BuildAsync is public on the concrete type only for tests. Consider a BackgroundService/Lazy<Snapshot> and degrade-don't-crash behavior.

Found during review of #1267; intentionally kept out of that PR.

Vorherrschende Sprache
HTML
Sterne
8
Forks
8
Ø Merge
3 Std. 24 Min.
Gemergte PRs (30 T.)
91

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus IntelliTect/EssentialCSharp.Web

Alle Issues in IntelliTect/EssentialCSharp.Web

Ähnliche Issues

Weitere Issues zu Backend & API Design

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.