Add cancellation token support across NordPool services and update constants for reuse
- Introduced `CancellationToken` to service methods for improved task cancellation handling. - Centralized reusable constants (`MinutesPerInterval`, `WaterReadyPowerThresholdWatts`) in `NordPoolConsts`. - Refactored `ConfigureAwait` usage and improved logging within `NordPoolEntityService`. - Adjusted tests to accommodate cancellation token changes.
This commit is contained in:
@@ -231,9 +231,9 @@ public class NordPoolInit : INordPoolInit
|
||||
}
|
||||
}
|
||||
|
||||
public async Task CleanupEntitiesAsync()
|
||||
public async Task CleanupEntitiesAsync(CancellationToken cancellationToken = default)
|
||||
{
|
||||
await _entityService.CleanupEntitiesAsync();
|
||||
await _entityService.CleanupEntitiesAsync(cancellationToken);
|
||||
}
|
||||
|
||||
private CheapestIntervalsUpdateResult UpdateCheapestIntervals()
|
||||
|
||||
Reference in New Issue
Block a user