< Summary

Information
Class: Anichron.Worker.Ingestion.IngestionShutdown
Assembly: Anichron.Worker
File(s): /home/runner/work/anichron/anichron/src/Anichron.Worker/Ingestion/IngestionShutdown.cs
Tag: 228_36821334185
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 11
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
IsInProgress(...)100%22100%

File(s)

/home/runner/work/anichron/anichron/src/Anichron.Worker/Ingestion/IngestionShutdown.cs

#LineLine coverage
 1namespace Anichron.Worker.Ingestion;
 2
 3internal static class IngestionShutdown
 4{
 5    // The one definition of "this is a clean shutdown, not an ingestion failure". Both the
 6    // compensation in the pipeline runner and the consumer loop's failure handling branch on it,
 7    // and they must never drift apart: a shutdown keeps the proxies it already completed and stops
 8    // taking new files, where a failure cleans up after itself and the crawl moves on.
 9    internal static bool IsInProgress(Exception exception, CancellationToken ct)
 1510        => exception is OperationCanceledException && ct.IsCancellationRequested;
 11}