Files
bom-local-service/Services/Scraping/IScrapingStep.cs
T
alex ffd3636d1c Remove minutes ago parsing, use UTC timestamps directly
- Refactor TimeParsingService to parse time strings to UTC only
- Remove minutesAgo from RadarFrame and FrameMetadata models
- Update CaptureFramesStep to extract UTC timestamps directly
- Update CacheService to store/load ObservationTime instead of MinutesAgo
- Update BomRadarService to use AbsoluteObservationTime directly
- Remove all backward compatibility code for old cache folders
- Update documentation and test SPA to calculate minutes ago on client
- Fix step registration to register concrete types for DI resolution
- Fix hosted service registration to use reflection correctly
2025-12-23 21:52:42 +10:00

32 lines
901 B
C#

using BomLocalService.Services.Interfaces.Registration;
namespace BomLocalService.Services.Scraping;
/// <summary>
/// Interface for a single scraping step
/// Steps are stateless (all request data is in ScrapingContext), so singleton lifetime is appropriate
/// </summary>
public interface IScrapingStep : ISingletonService
{
/// <summary>
/// Unique name of the step
/// </summary>
string Name { get; }
/// <summary>
/// Names of steps that must complete before this step can execute
/// </summary>
string[] Prerequisites { get; }
/// <summary>
/// Checks if the step can execute in the current page state
/// </summary>
bool CanExecute(ScrapingContext context);
/// <summary>
/// Executes the step
/// </summary>
Task<ScrapingStepResult> ExecuteAsync(ScrapingContext context, CancellationToken cancellationToken);
}